Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1471992pxu; Thu, 8 Oct 2020 12:17:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyht98+d2m+MyyShB7R8KmSPO/i7620mRqV15hiZdpBrsj5bDJr66VSPvGvJZJnCgIZ773c X-Received: by 2002:a17:906:6d92:: with SMTP id h18mr10047790ejt.405.1602184676098; Thu, 08 Oct 2020 12:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602184676; cv=none; d=google.com; s=arc-20160816; b=c3qI3FOkFm09FKlsoMIivva3kpIwVbeiwSTp8OyCAr/6ylnFt8Guo4EsW6RJyskVRm oJDCtN2tPcyiO2l6pE7BndEV5cnrl4rPWpPF73kwx0QGVhjiMQ2355l18PM4ruefhRNh YwvHG9ll4F/m3K86xIqDAOJzs+vtDVP7ftThjwrWzla0PxNWYmYu5UBBrRJAFwKEa1mi JRVjlq6Gj+IMEhe19yQFEoXnNWw6cb3dXOlRRffAUy86fA1aoPkc5ee8UbjhUa/TOogG h7smnbxtrwQ2REDJwb42Gd28+Fs8IxXbijVghstVQUFWsG1TP8ALBMNduof3N5evL2bk zyyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=npD0p0/Bhmu36e9HKWRm19UAMheq0WxBPSJRXHoWR10=; b=FlseudLks5Mp4vxFuEtBUw8AM0xqqZCWzsdiM19P2wCr2XNRm/9rxQ4V4KcfBCEuU9 kVIxDoFfBh82OOeEOzknXXMTeOFI23PCOi2NcaUOlAvMhBzM7EJYbpU4/wAh1U2KIec9 T0GgVwluIBgyroTO5sD9KP2vgazxdsZwXemMYwtt9hRZLVOhS5EhQf1Xm14zgFzYFsS2 HumaD5q7jkdYXMMMG2P5JCZDVZ7ZxwDFetLho8VAXL/WLlnjNVoOoJeTFt8HQY8jKbHm YPDoYo2ANYXMTEjeh0zzTwbGC1w7NURpMeqK3ZMTKB/poEAK3j5TtzH1Nz5JhhhY9WqM BcuA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si4441549ejn.471.2020.10.08.12.17.33; Thu, 08 Oct 2020 12:17:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729081AbgJHScq (ORCPT + 99 others); Thu, 8 Oct 2020 14:32:46 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37439 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729056AbgJHScq (ORCPT ); Thu, 8 Oct 2020 14:32:46 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kQaiW-0004ET-2h; Thu, 08 Oct 2020 18:32:40 +0000 From: Colin King To: Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, "James E . J . Bottomley" , "Martin K . Petersen" , Himanshu Madhani , Pavel Machek , linux-scsi@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: qla2xxx: fix return of uninitialized value in rval Date: Thu, 8 Oct 2020 19:32:39 +0100 Message-Id: <20201008183239.200358-1-colin.king@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King 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 --- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c 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