mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Colin King <colin.king@canonical.com>
Cc: Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Himanshu Madhani <himanshu.madhani@oracle.com>,
	Pavel Machek <pavel@denx.de>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: qla2xxx: fix return of uninitialized value in rval
Date: Thu, 8 Oct 2020 20:41:05 +0200	[thread overview]
Message-ID: <20201008184105.GA25478@duo.ucw.cz> (raw)
In-Reply-To: <20201008183239.200358-1-colin.king@canonical.com>

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

On Thu 2020-10-08 19:32:39, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> A previous change removed the initialization of rval and there is
> now an error where an uninitialized rval is being returned on an
> error return path. Fix this by returning -ENODEV.
> 
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: b994718760fa ("scsi: qla2xxx: Use constant when it is known")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Pavel Machek (CIP) <pavel@denx.de>

And sorry, I did patch against mainline, and this got added in -next
in the meantime.

> index ae47e0eb0311..1f9005125313 100644
> --- a/drivers/scsi/qla2xxx/qla_nvme.c
> +++ b/drivers/scsi/qla2xxx/qla_nvme.c
> @@ -561,7 +561,7 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
>  	vha = fcport->vha;
>  
>  	if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
> -		return rval;
> +		return -ENODEV;
>  
>  	if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
>  	    (qpair && !qpair->fw_started) || fcport->deleted)
> -- 
> 2.27.0
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2020-10-08 18:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 18:32 Colin King
2020-10-08 18:40 ` Himanshu Madhani
2020-10-08 18:41 ` Pavel Machek [this message]
2020-10-08 18:58   ` Colin Ian King
2020-10-08 20:50 ` Martin K. Petersen
2020-10-13 22:42 ` 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=20201008184105.GA25478@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=colin.king@canonical.com \
    --cc=himanshu.madhani@oracle.com \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.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®