diff options
author | Itai Garbi <igarbi@mellanox.com> | 2013-02-19 10:40:24 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-02-19 11:21:36 -0500 |
commit | 5a2815f03c0fd5a091c95af93b7f1a17a971ac20 (patch) | |
tree | 2a790316639dc28babca75bd51114e76c91bf7c9 /drivers/infiniband | |
parent | 4b48680b5572ee78834c276548e16ac5316908cb (diff) |
IPoIB: Don't attempt to release resources on error flow
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 <igarbi@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | 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 4fe44eba2f9f..66d6da90982f 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) | |||
1693 | return; | 1693 | return; |
1694 | 1694 | ||
1695 | dev_list = ib_get_client_data(device, &ipoib_client); | 1695 | dev_list = ib_get_client_data(device, &ipoib_client); |
1696 | if (!dev_list) | ||
1697 | return; | ||
1696 | 1698 | ||
1697 | list_for_each_entry_safe(priv, tmp, dev_list, list) { | 1699 | list_for_each_entry_safe(priv, tmp, dev_list, list) { |
1698 | ib_unregister_event_handler(&priv->event_handler); | 1700 | ib_unregister_event_handler(&priv->event_handler); |