Skip to contentSkip to conversation

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

PATCH Applied Wei Yongjun 3 participants 3 messages Jun 17, 2021 – Jun 19, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 4df84e846624 ("scsi: elx: efct: Driver initialization routines")
---
 drivers/scsi/elx/efct/efct_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/elx/efct/efct_hw.c +2 -2
index ce4736c41564..6324683f9e8e 100644
@@ -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);
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Wei Yongjun

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

Fixes 4df84e846624 ("scsi: elx: efct: Driver initialization routines")
---
  drivers/scsi/elx/efct/efct_hw.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks

-- james

#2 lore raw
In reply to Wei Yongjun

Wei,

Quoted 2 lines

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

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering