Skip to content

Commit

Permalink
IB/hfi1: Fix error return code in hfi1_init_dd()
Browse files Browse the repository at this point in the history
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Fixes: 4730f4a ("IB/hfi1: Activate the dummy netdev")
Link: https://lore.kernel.org/r/[email protected]
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhang Changzhong <[email protected]>
Acked-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
Zhang Changzhong authored and jgunthorpe committed Nov 13, 2020
1 parent b1e678b commit dabbd6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/hfi1/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
& CCE_REVISION_SW_MASK);

/* alloc netdev data */
if (hfi1_netdev_alloc(dd))
ret = hfi1_netdev_alloc(dd);
if (ret)
goto bail_cleanup;

ret = set_up_context_variables(dd);
Expand Down

0 comments on commit dabbd6a

Please sign in to comment.