From: Yuval Shaia Date: Mon, 25 Sep 2017 12:18:00 +0000 (-0700) Subject: IB/ipoib: Remove device when one port fails to init X-Git-Tag: v4.19~2157^2~112^2~98^3~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4b2d06892c7f700f3d62dfef603add35269612e;p=platform%2Fkernel%2Flinux-rpi.git IB/ipoib: Remove device when one port fails to init Call ipoib_remove_one when one of the IPoIB ports fails to initialize in order not to leave the module in unstable state. Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 2b1b0f2..1983494 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -2311,7 +2311,8 @@ static void ipoib_add_one(struct ib_device *device) } if (!count) { - kfree(dev_list); + pr_err("Failed to init port, removing it\n"); + ipoib_remove_one(device, dev_list); return; }