linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kashyap Desai <kashyap.desai@broadcom.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH -next resend] scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc()
Date: Wed, 16 Jun 2021 19:14:32 +0530	[thread overview]
Message-ID: <CAHsXFKEU2kd-yS2NEC+y3+D6ff6639z2NnZSxFzShV9SJJbX7A@mail.gmail.com> (raw)
In-Reply-To: <20210603151653.711020-1-yangyingliang@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

On Thu, Jun 3, 2021 at 8:42 PM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: fb9b04574f14 ("scsi: mpi3mr: Add support for recovering controller")
> 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 | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> index acb2be62080a..dbf116414855 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;
>         }
> @@ -3391,6 +3392,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc, u8 re_init)
>
>         if (re_init &&
>             (mrioc->shost->nr_hw_queues > mrioc->num_op_reply_q)) {
> +               retval = -1;
>                 ioc_err(mrioc,
>                     "Cannot create minimum number of OpQueues expected:%d created:%d\n",
>                     mrioc->shost->nr_hw_queues, mrioc->num_op_reply_q);
> --

Acked-by: Kashyap Desai <kashyap.desai@broadcom.com>

> 2.25.1
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

  reply	other threads:[~2021-06-16 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 15:16 [PATCH -next resend] scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc() Yang Yingliang
2021-06-16 13:44 ` Kashyap Desai [this message]
2021-06-19  2:03 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHsXFKEU2kd-yS2NEC+y3+D6ff6639z2NnZSxFzShV9SJJbX7A@mail.gmail.com \
    --to=kashyap.desai@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).