aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <[email protected]>2021-06-17 02:48:37 +0000
committerMartin K. Petersen <[email protected]>2021-06-18 23:01:03 -0400
commit41962aba2dc622b456aaf3c20e1089084714f73f (patch)
tree7febf0061bb240b5f6b4fbfa834921729b57deef
parent61bf3fdb5dd0e6980a6b514a924ea1da75e2a946 (diff)
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/[email protected] Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines") Reported-by: Hulk Robot <[email protected]> Reviewed-by: James Smart <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/elx/efct/efct_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c
index ce4736c41564..6324683f9e8e 100644
--- a/drivers/scsi/elx/efct/efct_hw.c
+++ b/drivers/scsi/elx/efct/efct_hw.c
@@ -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);