From: Itai Garbi <[email protected]>

If the ipoib client info isn't found on the _remove_one callback, we must
not attempt to scan the returned null list, found by Coverity.

Signed-off-by: Itai Garbi <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c 
b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index e9ee07b..2548ef8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1693,6 +1693,8 @@ static void ipoib_remove_one(struct ib_device *device)
                return;
 
        dev_list = ib_get_client_data(device, &ipoib_client);
+       if (!dev_list)
+               return;
 
        list_for_each_entry_safe(priv, tmp, dev_list, list) {
                ib_unregister_event_handler(&priv->event_handler);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to