summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorLeon Romanovsky <leon@leon.nu>2016-02-21 16:12:26 (GMT)
committerDoug Ledford <dledford@redhat.com>2016-03-01 01:41:47 (GMT)
commit5adebafb75bdfbbe4ec69f14c3613e70f6ed7f6f (patch)
tree1f77f42aafebb111009177b3997de34c53d3ca23 /drivers/infiniband/core
parentc2bab619813a525d3f58b5ffbfcdc4edee27e497 (diff)
downloadlinux-5adebafb75bdfbbe4ec69f14c3613e70f6ed7f6f.tar.xz
IB/core: Fix missed clean call in registration path
In case of failure returned from query function in IB device registration, we need to clean IB cache which was missed. This change fixes it. Fixes: 3e153a93a1c1 ('IB/core: Save the device attributes on the device structure') Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 00da80e..94b80a5 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -358,6 +358,7 @@ int ib_register_device(struct ib_device *device,
ret = device->query_device(device, &device->attrs, &uhw);
if (ret) {
printk(KERN_WARNING "Couldn't query the device attributes\n");
+ ib_cache_cleanup_one(device);
goto out;
}