Added missing error handling in ib_core init. (Wasn't intentional right?)
Signed-off-by: Nir Muchtar <[email protected]>
---
drivers/infiniband/core/device.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index a19effa..6e06e37 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -719,15 +719,22 @@ static int __init ib_core_init(void)
int ret;
ret = ib_sysfs_setup();
- if (ret)
+ if (ret) {
printk(KERN_WARNING "Couldn't create InfiniBand device
class\n");
+ goto err;
+ }
ret = ib_cache_setup();
if (ret) {
printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID
cache\n");
- ib_sysfs_cleanup();
+ goto err_sysfs;
}
+ return 0;
+
+err_sysfs:
+ ib_sysfs_cleanup();
+err:
return ret;
}
--
1.7.0.4
--
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