Skip to content

Commit dabbd6a

Browse files
Zhang Changzhongjgunthorpe
authored andcommitted
IB/hfi1: Fix error return code in hfi1_init_dd()
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/1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent b1e678b commit dabbd6a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/infiniband/hw/hfi1

drivers/infiniband/hw/hfi1/chip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
1524515245
& CCE_REVISION_SW_MASK);
1524615246

1524715247
/* alloc netdev data */
15248-
if (hfi1_netdev_alloc(dd))
15248+
ret = hfi1_netdev_alloc(dd);
15249+
if (ret)
1524915250
goto bail_cleanup;
1525015251

1525115252
ret = set_up_context_variables(dd);

0 commit comments

Comments
 (0)