All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init()
@ 2021-06-17  2:48 Wei Yongjun
  2021-06-18 22:51 ` James Smart
  2021-06-19  2:29 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2021-06-17  2:48 UTC (permalink / raw)
  To: weiyongjun1, James Smart, James Smart, Ram Vegesna,
	James E.J. Bottomley, Martin K. Petersen, Daniel Wagner,
	Hannes Reinecke
  Cc: linux-scsi, target-devel, kernel-janitors, Hulk Robot

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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/scsi/elx/efct/efct_hw.c | 4 ++--
 1 file 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);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init()
  2021-06-17  2:48 [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init() Wei Yongjun
@ 2021-06-18 22:51 ` James Smart
  2021-06-19  2:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: James Smart @ 2021-06-18 22:51 UTC (permalink / raw)
  To: Wei Yongjun, James Smart, Ram Vegesna, James E.J. Bottomley,
	Martin K. Petersen, Daniel Wagner, Hannes Reinecke
  Cc: linux-scsi, target-devel, kernel-janitors, Hulk Robot

On 6/16/2021 7:48 PM, Wei Yongjun wrote:
> 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")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/scsi/elx/efct/efct_hw.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Thanks

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init()
  2021-06-17  2:48 [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init() Wei Yongjun
  2021-06-18 22:51 ` James Smart
@ 2021-06-19  2:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-06-19  2:29 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: James Smart, James Smart, Ram Vegesna, James E.J. Bottomley,
	Martin K. Petersen, Daniel Wagner, Hannes Reinecke, linux-scsi,
	target-devel, kernel-janitors, Hulk Robot


Wei,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-19  2:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  2:48 [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init() Wei Yongjun
2021-06-18 22:51 ` James Smart
2021-06-19  2:29 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.