From: Wei Yongjun Date: Fri, 19 Apr 2013 01:23:28 +0000 (+0800) Subject: [SCSI] scsi_transport_iscsi: fix error return code in iscsi_transport_init() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bcab2ccdc61679b6e33d35ae3fe8275df8e20c61;p=linux-beck.git [SCSI] scsi_transport_iscsi: fix error return code in iscsi_transport_init() Fix to return -ENOMEM in the create workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 47799a33d6ca..475265a51a51 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -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;