diff options
| author | Yuval Shaia <[email protected]> | 2017-09-25 05:18:00 -0700 |
|---|---|---|
| committer | Doug Ledford <[email protected]> | 2017-09-27 09:17:51 -0400 |
| commit | e4b2d06892c7f700f3d62dfef603add35269612e (patch) | |
| tree | 9b8bc6907b397d75eaa7b9bc4f9d4215df95822f | |
| parent | 3e4d6f91cae689b01865aedb71c1ad88a118084f (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 <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
| -rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 |
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; } |