Received: by 10.213.65.68 with SMTP id h4csp2175952imn; Sun, 8 Apr 2018 21:43:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx48u9h+KpeLyntvJulkhdcM3QkmlyRdKSCjy1lTHQxRaGOHIdQHqA0pmo3p0Jj4b1pSodZFV X-Received: by 10.98.152.217 with SMTP id d86mr5682959pfk.18.1523249039448; Sun, 08 Apr 2018 21:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523249039; cv=none; d=google.com; s=arc-20160816; b=LLJGT3dtPV4YSszIxi5/YTKb2FYrBhPZk5ybUBk+L3+6OPlyQIh2qye52XNjt1zWXz 3csWOla+3C+f0sJcA/GvB42EHv3h57b+4inuAc/+flrnGewSCmyZ3O2RqOaorbchS7RR DtDQPeQuwXGBofktoDrd+giQ9ASQ5tSWRb8E/Me5iufh6flR9tL1+IAa1Yt/2Fe7eWg+ UZ0Kn/i4Gq3RKmjdpJQs8987kKhw+VjDnakUMOUtleDeYoNaEeB4U/CO3vynSwy1gNEe DW/9qAhU1afNxnUOBXL44a+x4dNuKq+jZSwGefWk8CMFRpBDrScxhh0XqVtpPmeP5M9Y yyTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=r5wD4Fs/PygfOmnp2pbfoMCey6qaHceov3kaTYPbwA0=; b=Z7HtFIvS8nUmWPRRxzoCIFesFW3645EIOXLwreGCfpOXVhNEjnBdr3lNpWuJrvNdqb CE5ea1jm8iuYqgW48iOr1I710PQBPmmFHcvfzUKTBaSBLTVq6lAQjFLS7/eaFJcQrbEN YPPTIQ0XImAd85whv5FW02NRFFs5D0O25RsnmFOYDEUxJRoOSvOZInyuYr1gIlMnolEC VNpCSLF0Cl0tnf9Dpqx7em3npxezZbW3Yhk0ks4Acy0qJMnoxolYl1s34M8LKReeJotG TnuwqLqxLNiVAMjRhHhsYNsPFb9Z4AbwEBl/cOxTH6XvJxlsP1SykDdJ28JI3JPjc82t CqZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=GQLmx8Oo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si4131853pfb.42.2018.04.08.21.43.22; Sun, 08 Apr 2018 21:43:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=GQLmx8Oo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbeDIART (ORCPT + 99 others); Sun, 8 Apr 2018 20:17:19 -0400 Received: from mail-co1nam03on0101.outbound.protection.outlook.com ([104.47.40.101]:48974 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753063AbeDIARN (ORCPT ); Sun, 8 Apr 2018 20:17:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=r5wD4Fs/PygfOmnp2pbfoMCey6qaHceov3kaTYPbwA0=; b=GQLmx8OoBrOqxmctd0Fe7yctVkZwRC7mnIf0CjDHfj5lGwKy84rdxg6zxzzeixKnfrR+hk8guCKrYRqOyUb/19/JDHAQpQ3u1sc8CyYBqUhZxE9K7k/V+e0O2FWkZl6YBf9ehyWq3dXcKLFy4CdOqnIESFwSacGlR+79hG8nVxY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1127.namprd21.prod.outlook.com (52.132.132.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:17:07 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:17:07 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "himanshu.madhani@cavium.com" , Quinn Tran , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 027/189] scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout() Thread-Topic: [PATCH AUTOSEL for 4.15 027/189] scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout() Thread-Index: AQHTz5gY7BIAi069oEKn9cfn/nlkcw== Date: Mon, 9 Apr 2018 00:17:07 +0000 Message-ID: <20180409001637.162453-27-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1127;7:l5Q21eEDXag6+4E/TSvPSnEWrm68AO84V+MztAiFxwNaj08Z0b21+FIlbYFqGq5B9Ge0UkxLrRg4pVWDy1QyDfuBeacOqEdaG6Wl9siZ9XzkkT9V2r3mLltTvsWA9cmmb/ZnIgdnThqn49ju2vsP8vogd/WIn2Sd2u6l1z1FyvHQ9DLhuxC+Sp5QemtzF38xEve/ZJ1WP4vJ2Q46+adLPp4sbUszhkzcY3xAP+ql50KpoOxth/1L3+2ZgssrFaqh;20:Wc1AZQQXsAmnSm/o3B5XBmz0G5O4NxjdzPiq2tQlQvPmB3df1bR42OB6rFut2JmhOx8LytnBNoVV/DsgFGdd2aqVYOm/tCU9M3/86YQBmNzpuLeW63T2qiX+mgbOQG/xW1Fgw2xwN/0ElthSXoE4waEPq2KMbWS1lXx+88kY7Fg= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: ce489ebe-39d0-4210-05b9-08d59daf3ae3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1127; x-ms-traffictypediagnostic: DM5PR2101MB1127: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1127;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1127; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39380400002)(39860400002)(376002)(346002)(366004)(189003)(199004)(105586002)(186003)(66066001)(6486002)(54906003)(7736002)(26005)(575784001)(86362001)(316002)(305945005)(110136005)(478600001)(3280700002)(86612001)(10290500003)(25786009)(5250100002)(2616005)(99286004)(22452003)(15760500003)(5660300001)(3660700001)(2900100001)(81166006)(3846002)(2906002)(106356001)(6506007)(59450400001)(107886003)(486006)(8676002)(81156014)(14454004)(10090500001)(68736007)(4326008)(6116002)(1076002)(72206003)(102836004)(97736004)(11346002)(8936002)(476003)(2501003)(6436002)(6512007)(446003)(76176011)(36756003)(53936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1127;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 55TANg5P71QxoEY6I5uxLqOomjfPdMNMu8NQD5sKVObylAprv4Spg/mfoy/kjtKRq1low9hgdIL1g26eHBi471NXrVI7qs66Mz+WVyPctQk6MtOrk/1AndAK8n+L/gc7daYO/5V6N1WSkE2vScjLd0b0MbNpM5sfdq0+ZyVz1x8/cs1/mh2h00df/MrAUTAX/yPTHojKXBaduZudwjuILHEDCblI80LyUdaevIJCkikks2XPLidFzCPMwZaUlgzaxDjfZVb9E45jOd/1gXCqBVbm4OjUF1GTRN5NoJ2JnNBiMHfakGKVSv0cVmqrqaHNCtcVs1YM/xsimjR45boByzBAEGJLo7foLZq/ZMk5jphPlX+TgtwQxQGEpQuKdSQFneD5J4sc58F34/Qv5ugzCQB306mM9yBlcXC+wzwp6Xk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce489ebe-39d0-4210-05b9-08d59daf3ae3 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:17:07.4337 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1127 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "himanshu.madhani@cavium.com" [ Upstream commit 7ac0c332f96bb9688560726f5e80c097ed8de59a ] This patch fixes following Smatch warning: drivers/scsi/qla2xxx/qla_init.c:130 qla2x00_async_iocb_timeout() error: we = previously assumed 'fcport' could be null (see line 107) Fixes: 5c25d451163c ("scsi: qla2xxx: Fix NULL pointer access for fcport str= ucture") Reported by: Dan Carpenter Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/qla_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_ini= t.c index 7b44a2c68a45..e05438d1da20 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -115,6 +115,8 @@ qla2x00_async_iocb_timeout(void *data) =20 switch (sp->type) { case SRB_LOGIN_CMD: + if (!fcport) + break; /* Retry as needed. */ lio->u.logio.data[0] =3D MBS_COMMAND_ERROR; lio->u.logio.data[1] =3D lio->u.logio.flags & SRB_LOGIN_RETRIED ? @@ -128,6 +130,8 @@ qla2x00_async_iocb_timeout(void *data) qla24xx_handle_plogi_done_event(fcport->vha, &ea); break; case SRB_LOGOUT_CMD: + if (!fcport) + break; qlt_logo_completion_handler(fcport, QLA_FUNCTION_TIMEOUT); break; case SRB_CT_PTHRU_CMD: --=20 2.15.1