[SCSI] scsi_transport_iscsi: fix error return code in iscsi_transport_init()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 19 Apr 2013 01:23:28 +0000 (09:23 +0800)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 2 May 2013 22:31:50 +0000 (15:31 -0700)
Fix to return -ENOMEM in the create workqueue error case
instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_transport_iscsi.c

index 47799a33d6caacf7e5715e9c7760d121c24797b1..475265a51a51a7f63365ea0dc16511e74779da0e 100644 (file)
@@ -3985,8 +3985,10 @@ static __init int iscsi_transport_init(void)
        }
 
        iscsi_eh_timer_workq = create_singlethread_workqueue("iscsi_eh");
-       if (!iscsi_eh_timer_workq)
+       if (!iscsi_eh_timer_workq) {
+               err = -ENOMEM;
                goto release_nls;
+       }
 
        return 0;