Skip to content

Commit 48e0a65

Browse files
mjruhldledford
authored andcommitted
IB/hfi1: Return actual error value from program_rcvarray()
A failure of program_rcvarray() is treated inconsistently by the calling function. In one case the error is returned, in a second case, the error is overwritten with EFAULT. In both cases the code path is doing the same thing, allocating memory for groups, so it should be consistent. Make the error path consistent and return the error generated by program_rcvarray(). Reviewed-by: Harish Chegondi <[email protected]> Fixes: 7e7a436 ("staging/hfi1: Add TID entry program function body") Signed-off-by: Michael J. Ruhl <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 254361c commit 48e0a65

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/infiniband/hw/hfi1/user_exp_rcv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ int hfi1_user_exp_rcv_setup(struct hfi1_filedata *fd,
437437
hfi1_cdbg(TID,
438438
"Failed to program RcvArray entries %d",
439439
ret);
440-
ret = -EFAULT;
441440
goto unlock;
442441
} else if (ret > 0) {
443442
if (grp->used == grp->size)

0 commit comments

Comments
 (0)