mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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: 4df84e8466
("scsi: elx: efct: Driver initialization routines")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
61bf3fdb5d
commit
41962aba2d
@ -1044,8 +1044,8 @@ efct_hw_init(struct efct_hw *hw)
|
||||
*/
|
||||
hw->wq_reqtag_pool = efct_hw_reqtag_pool_alloc(hw);
|
||||
if (!hw->wq_reqtag_pool) {
|
||||
efc_log_err(hw->os, "efct_hw_reqtag_init failed %d\n", rc);
|
||||
return rc;
|
||||
efc_log_err(hw->os, "efct_hw_reqtag_pool_alloc failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
rc = efct_hw_setup_io(hw);
|
||||
|
Loading…
Reference in New Issue
Block a user