Skip to content

Commit

Permalink
[SCSI] scsi_transport_iscsi: fix error return code in iscsi_transport…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Wei Yongjun authored and James Bottomley committed May 2, 2013
1 parent 2267a29 commit bcab2cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/scsi_transport_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bcab2cc

Please sign in to comment.