mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Zheyu Ma <zheyuma97@gmail.com>
Cc: Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream
	<GR-QLogic-Storage-Upstream@marvell.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	Martin Petersen <martin.petersen@oracle.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: qla2xxx: Return -ENOMEM if kzalloc() fails
Date: Mon, 18 Oct 2021 14:20:47 +0000	[thread overview]
Message-ID: <D717C3AD-1753-4785-80EA-B20A17506750@oracle.com> (raw)
In-Reply-To: <1634522181-31166-1-git-send-email-zheyuma97@gmail.com>



> On Oct 17, 2021, at 8:56 PM, Zheyu Ma <zheyuma97@gmail.com> wrote:
> 
> During the process of driver probing, probe function should return < 0
> for failure, otherwise kernel will treat value > 0 as success.
> 
> Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
> ---
> drivers/scsi/qla2xxx/qla_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index d2e40aaba734..836fedcea241 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -4157,7 +4157,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
> 					ql_dbg_pci(ql_dbg_init, ha->pdev,
> 					    0xe0ee, "%s: failed alloc dsd\n",
> 					    __func__);
> -					return 1;
> +					return -ENOMEM;
> 				}
> 				ha->dif_bundle_kallocs++;
> 
> -- 
> 2.17.6
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


  reply	other threads:[~2021-10-18 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  1:56 Zheyu Ma
2021-10-18 14:20 ` Himanshu Madhani [this message]
2021-10-19  3:43 ` 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=D717C3AD-1753-4785-80EA-B20A17506750@oracle.com \
    --to=himanshu.madhani@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=zheyuma97@gmail.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

all inboxes | Powered by JetHome®