linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc()
@ 2021-06-03 15:12 Yang Yingliang
  2021-06-03 15:20 ` Yang Yingliang
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-06-03 15:12 UTC (permalink / raw)
  To: linux-kernel, linux-scsi; +Cc: jejb, martin.petersen

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 824a156633df ("scsi: mpi3mr: Base driver code")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index acb2be62080a..b8ecbdf08b3c 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -3295,6 +3295,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc, u8 re_init)
 	}
 	ioc_state = mpi3mr_get_iocstate(mrioc);
 	if (ioc_state != MRIOC_STATE_RESET) {
+		retval = -1;
 		ioc_err(mrioc, "Cannot bring IOC to reset state\n");
 		goto out_failed;
 	}
-- 
2.25.1


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

* Re: [PATCH -next] scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc()
  2021-06-03 15:12 [PATCH -next] scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc() Yang Yingliang
@ 2021-06-03 15:20 ` Yang Yingliang
  0 siblings, 0 replies; 2+ messages in thread
From: Yang Yingliang @ 2021-06-03 15:20 UTC (permalink / raw)
  To: linux-kernel, linux-scsi; +Cc: jejb, martin.petersen

Pls ignore this patch, I missed a branch to change.

On 2021/6/3 23:12, Yang Yingliang wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 824a156633df ("scsi: mpi3mr: Base driver code")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>   drivers/scsi/mpi3mr/mpi3mr_fw.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> index acb2be62080a..b8ecbdf08b3c 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> @@ -3295,6 +3295,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc, u8 re_init)
>   	}
>   	ioc_state = mpi3mr_get_iocstate(mrioc);
>   	if (ioc_state != MRIOC_STATE_RESET) {
> +		retval = -1;
>   		ioc_err(mrioc, "Cannot bring IOC to reset state\n");
>   		goto out_failed;
>   	}

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

end of thread, other threads:[~2021-06-03 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 15:12 [PATCH -next] scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc() Yang Yingliang
2021-06-03 15:20 ` Yang Yingliang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).