Commit 41962aba authored by Wei Yongjun's avatar Wei Yongjun Committed by Martin K. Petersen

scsi: elx: efct: Fix error handling in efct_hw_init()

Fix to return negative error code -ENOMEM from the error handling case
instead of 0. Also fix typo in error message.

Link: https://lore.kernel.org/r/20210617024837.1023069-1-weiyongjun1@huawei.com
Fixes: 4df84e84 ("scsi: elx: efct: Driver initialization routines")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Reviewed-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 61bf3fdb
...@@ -1044,8 +1044,8 @@ efct_hw_init(struct efct_hw *hw) ...@@ -1044,8 +1044,8 @@ efct_hw_init(struct efct_hw *hw)
*/ */
hw->wq_reqtag_pool = efct_hw_reqtag_pool_alloc(hw); hw->wq_reqtag_pool = efct_hw_reqtag_pool_alloc(hw);
if (!hw->wq_reqtag_pool) { if (!hw->wq_reqtag_pool) {
efc_log_err(hw->os, "efct_hw_reqtag_init failed %d\n", rc); efc_log_err(hw->os, "efct_hw_reqtag_pool_alloc failed\n");
return rc; return -ENOMEM;
} }
rc = efct_hw_setup_io(hw); rc = efct_hw_setup_io(hw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment