Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1472502pxu; Thu, 8 Oct 2020 12:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYAAqZTcXLf+f9j2zzN7O+w/+32Gs1mSIs251MJpfC6/kbYOAv0GE9L1iYXhtAJrNfii2N X-Received: by 2002:a17:906:2604:: with SMTP id h4mr9953737ejc.26.1602184722983; Thu, 08 Oct 2020 12:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602184722; cv=none; d=google.com; s=arc-20160816; b=b1owCCHAZlniBPSOzOVR5fx2UERybKfAOHLta5uKpU8XapUslTw/OeF251V2t2E7EX qBc+S6JHDvv9EneYGOu4NQdXHawSKUtOGHt2KSN0gImph5obWoEjVN2o/Jp76fWrv6vS ba5Oq444YdJoe9iLSp84oTemz2geJEuFPMDiiHPTp3ETh4hFyGAg476+Ysg343VYDirs tePomA2GicRy0dmpV3jNH9S1pUpJkQ4bxKe12LqOWu0aJ0O+LeccumyayYh0D6iEbx1p oKoe5ofPofsDCSchkRcqRlM5+DwGVvEi0nEsGWQd8F0oxydTE0j0VdgGS+rT0p+RjDg/ ql2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KNIrwTuCvIeNEOnqRtBneIgUSfuMVXfekXADa6n53Qg=; b=eH+AgvBlXDvloXAJh38NGXRduE5KxMJX+F7sUqAfitkm20nTmz/fvb7HL3QRA992fW GhYdYTp37zHl6l0Ke11lN2RMRgy0HGfKthJ6l7ttWDqel9x/BVem8KxiXTyDBu/Ic3ge W7MkcR7sxGUIiz7KmFzB+2Te1W/g259tMBfQ4JV8N2/SLCpLwCA80xnVWAxvvdFWsjJT 4pmy01CR8/2x22aKzTDNe1Rz2UyO6kQrQZTlt1wBV7d3xK9tvJpaoEdqlCy3lpgHkAZ3 pGne8q2Hv9UP1iwlf677BEYqjbEeu+y+iNufVBZNujqWRhFXtRkKKp0BPuh67HdnNzRD 4X+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd2si3569442ejb.347.2020.10.08.12.18.20; Thu, 08 Oct 2020 12:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729283AbgJHSlI (ORCPT + 99 others); Thu, 8 Oct 2020 14:41:08 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:54270 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729235AbgJHSlH (ORCPT ); Thu, 8 Oct 2020 14:41:07 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 8C1F41C0B88; Thu, 8 Oct 2020 20:41:05 +0200 (CEST) Date: Thu, 8 Oct 2020 20:41:05 +0200 From: Pavel Machek To: Colin King Cc: Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, "James E . J . Bottomley" , "Martin K . Petersen" , Himanshu Madhani , Pavel Machek , 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 Message-ID: <20201008184105.GA25478@duo.ucw.cz> References: <20201008183239.200358-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <20201008183239.200358-1-colin.king@canonical.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2020-10-08 19:32:39, Colin King wrote: > From: Colin Ian King >=20 > 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. >=20 > Addresses-Coverity: ("Uninitialized scalar variable") > Fixes: b994718760fa ("scsi: qla2xxx: Use constant when it is known") > Signed-off-by: Colin Ian King Acked-by: Pavel Machek (CIP) 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_por= t *lport, > vha =3D fcport->vha; > =20 > if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED)) > - return rval; > + return -ENODEV; > =20 > if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || > (qpair && !qpair->fw_started) || fcport->deleted) > --=20 > 2.27.0 >=20 --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCX39dQQAKCRAw5/Bqldv6 8ubJAJ9uH8LPqGBKU/7lXMlanF7poxaB7ACfTuzPpcPJVYHRQWYJQsEYlmq+bnY= =D4l5 -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--