summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/ipoib
diff options
context:
space:
mode:
authorYuval Shaia <yuval.shaia@oracle.com>2017-09-25 05:18:00 -0700
committerDoug Ledford <dledford@redhat.com>2017-09-27 09:17:51 -0400
commite4b2d06892c7f700f3d62dfef603add35269612e (patch)
tree9b8bc6907b397d75eaa7b9bc4f9d4215df95822f /drivers/infiniband/ulp/ipoib
parent3e4d6f91cae689b01865aedb71c1ad88a118084f (diff)
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 <yuval.shaia@oracle.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 2b1b0f2da8fb..1983494f2c38 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;
}