From: Colin Ian King <colin.king@canonical.com>
To: Pavel Machek <pavel@denx.de>
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>,
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, 08 Oct 2020 18:58:52 +0000 [thread overview]
Message-ID: <d9b88091-27ba-5197-6979-710bd8075350@canonical.com> (raw)
In-Reply-To: <20201008184105.GA25478@duo.ucw.cz>
On 08/10/2020 19:41, Pavel Machek wrote:
> 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.
Ah, that explains it. No problem, Coverity is good at finding buglets
Colin
>
>> 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
>>
>
next prev parent reply other threads:[~2020-10-08 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 18:32 [PATCH] scsi: qla2xxx: fix return of uninitialized value in rval Colin King
2020-10-08 18:40 ` Himanshu Madhani
2020-10-08 18:41 ` Pavel Machek
2020-10-08 18:58 ` Colin Ian King [this message]
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=d9b88091-27ba-5197-6979-710bd8075350@canonical.com \
--to=colin.king@canonical.com \
--cc=GR-QLogic-Storage-Upstream@marvell.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 \
--cc=pavel@denx.de \
/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).