Skip to content

Commit 745cb5e

Browse files
Wei Yongjungregkh
authored andcommitted
IB/ipoib: Fix error return code in ipoib_dev_init()
[ Upstream commit 99a7e2b ] Fix to return a negative error code from the ipoib_neigh_hash_init() error handling case instead of 0, as done elsewhere in this function. Fixes: 515ed4f ("IB/IPoIB: Separate control and data related initializations") Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 030f2ad commit 745cb5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/infiniband/ulp/ipoib/ipoib_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
17521752
goto out_free_pd;
17531753
}
17541754

1755-
if (ipoib_neigh_hash_init(priv) < 0) {
1755+
ret = ipoib_neigh_hash_init(priv);
1756+
if (ret) {
17561757
pr_warn("%s failed to init neigh hash\n", dev->name);
17571758
goto out_dev_uninit;
17581759
}

0 commit comments

Comments
 (0)