瀏覽代碼

[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 <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Wei Yongjun 12 年之前
父節點
當前提交
bcab2ccdc6
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/scsi/scsi_transport_iscsi.c

+ 3 - 1
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;