diff options
-rw-r--r-- | drivers/infiniband/core/device.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index f793bf2f5da7..46a7a3febc12 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c | |||
@@ -725,16 +725,24 @@ static int __init ib_core_init(void) | |||
725 | return -ENOMEM; | 725 | return -ENOMEM; |
726 | 726 | ||
727 | ret = ib_sysfs_setup(); | 727 | ret = ib_sysfs_setup(); |
728 | if (ret) | 728 | if (ret) { |
729 | printk(KERN_WARNING "Couldn't create InfiniBand device class\n"); | 729 | printk(KERN_WARNING "Couldn't create InfiniBand device class\n"); |
730 | goto err; | ||
731 | } | ||
730 | 732 | ||
731 | ret = ib_cache_setup(); | 733 | ret = ib_cache_setup(); |
732 | if (ret) { | 734 | if (ret) { |
733 | printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n"); | 735 | printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n"); |
734 | ib_sysfs_cleanup(); | 736 | goto err_sysfs; |
735 | destroy_workqueue(ib_wq); | ||
736 | } | 737 | } |
737 | 738 | ||
739 | return 0; | ||
740 | |||
741 | err_sysfs: | ||
742 | ib_sysfs_cleanup(); | ||
743 | |||
744 | err: | ||
745 | destroy_workqueue(ib_wq); | ||
738 | return ret; | 746 | return ret; |
739 | } | 747 | } |
740 | 748 | ||