Re: [PATCH -next] [SCSI] scsi_transport_iscsi: fix error return code in iscsi_transport_init()

11 views
Skip to first unread message

Mike Christie

unread,
Apr 20, 2013, 4:06:41 AM4/20/13
to Wei Yongjun, JBott...@parallels.com, yongj...@trendmicro.com.cn, open-...@googlegroups.com, linux...@vger.kernel.org
On 04/18/2013 06:23 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongj...@trendmicro.com.cn>
>
> Fix to return -ENOMEM in the create workqueue error case
> instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongj...@trendmicro.com.cn>

Patch is correct.

Reviewed-by: Mike Christie <mich...@cs.wisc.edu>

Wei Yongjun

unread,
Apr 18, 2013, 9:23:28 PM4/18/13
to mich...@cs.wisc.edu, JBott...@parallels.com, yongj...@trendmicro.com.cn, open-...@googlegroups.com, linux...@vger.kernel.org
From: Wei Yongjun <yongj...@trendmicro.com.cn>

Fix to return -ENOMEM in the create workqueue error case
instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongj...@trendmicro.com.cn>
---
drivers/scsi/scsi_transport_iscsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 47799a3..475265a 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;


Reply all
Reply to author
Forward
0 new messages