Received: by 10.213.65.68 with SMTP id h4csp2203823imn; Sun, 8 Apr 2018 22:26:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/poQAhf9j6sLXt3JbWGuhfvetIgIi4JnQHB8KHexSPTVX9COVtsKPC1kyC9n5PNhbpjvom X-Received: by 10.98.67.217 with SMTP id l86mr28213598pfi.40.1523251566006; Sun, 08 Apr 2018 22:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523251565; cv=none; d=google.com; s=arc-20160816; b=JScjrJjnNu0Dpd3fk1DOILjjWSTx/dohnkovSpzxP9jSoWYuFp1Uxnj+EMnak8KYPv RbaooCgggWZuBxXzoOS12SL8yyBAc6reQnZJ9mYgy+yTdble67qMknPkF5WhuILqQOMz 1vzrSFAjZd5H+xzhke/Fojn+3zxB6vEfspIGew5sSBfziPliadK32eoXo4qFMOQexH/n zkPGWKT5aoZlCJsbUufqSjokfxpqPtdIdUetKsfV0CkFvTI2B8i7cMLJpyGGheqOBxjb R2zz7R5Y2eUh++JflNsIdcM9KibT2bnEvShXty+SwINH1dlw5bmSBJQA4jyL6ImguxgQ zzXg== 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=YouJVq8avBLb/xYn8G9lvn+2TICTMUhWsRuA9U69TVQ=; b=tlBPFOHji0q9Mds6MMZ2yktgXary7gk3P/3V4TxtnFkT+tpV4j6w8BPr0GI1K+LIaQ o5gLllwsish39B/IRJ3LTZbJFEoBmD/w4xhvgdqLw3/lUHsIS+axs4IXEv+f8SxZRBc6 weZGXU2Y+7aZ/QydIxGUv41MsgmAroGp+7ltwdKy/9FmRrx5KNO3NV+WAZTPexb7GLVi aeHIuhfgOG7/9aItGBiSV6WItOdBANTC5WsafSbr6MW8iZWNsI66soQBMOwi0SdGGvNN VFRdZj9HBlD940NY5B18SfazWWSnof4p4hIh8AAAFP68NGMSwK724i5O7IKOOPHm2vsB bU0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=AdqYlouR; 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 l5si12420535pfa.368.2018.04.08.22.25.27; Sun, 08 Apr 2018 22:26:05 -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=AdqYlouR; 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 S1754707AbeDIAWo (ORCPT + 99 others); Sun, 8 Apr 2018 20:22:44 -0400 Received: from mail-sn1nam01on0122.outbound.protection.outlook.com ([104.47.32.122]:20813 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753402AbeDIAWl (ORCPT ); Sun, 8 Apr 2018 20:22:41 -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=YouJVq8avBLb/xYn8G9lvn+2TICTMUhWsRuA9U69TVQ=; b=AdqYlouRyzT07Nl1TQuyEZU3eZIk18ZBvVetUS6yH+2lTmC6ypabl3PeU/HkE3KH225pXwhC6oiUfJ1ue4iaihmBzB3I6WMN26SuFfJ+ZKJOyDmYCgfcCuk6ohF/Gw/dI/JgxrS1XuUAUMPXf3U6kp/cJscUVrWcQZrafACYQjE= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0966.namprd21.prod.outlook.com (52.132.133.24) 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:22:39 +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:22:39 +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.14 023/161] scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout() Thread-Topic: [PATCH AUTOSEL for 4.14 023/161] scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout() Thread-Index: AQHTz5h+VPFamnMzZ0uF0ygjTvHFzA== Date: Mon, 9 Apr 2018 00:19:59 +0000 Message-ID: <20180409001936.162706-23-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-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;DM5PR2101MB0966;7:iBQJHtcEsYivGnOjSWLJAoCJ+7Dy8NNkCSJwJ1rjxIPoLJK2KQNwdKGcRPl24zAOP84XzCRyjOQdP1b7sglcTHtrxozIGDihzYsrcXhCim74/8qWnKPzF1yLKzz/7JX9YXL7FsemcMZd48qLKYeFnTKB5yzIfUhhq1qzPak0sVd2BXE2Fs/Hw0SEkg5F3lPHdw4skgreY5BlBdR/EMAlxq0QvCdMO92cBk3NknM1ftMMoQ0AMXYXrInIlWyH5hwU;20:Yg/UwOdLmMcpPkzUSA50RR4V1zlR8OqNVc7GL96IgJP7h21ONbWSH1ECivpJSECgLvsC/TRk6yDvdrwI3DCjR5pigCF76kwHXti93zOplnuQhLjX2LDw2s9iE58ABmrxJC8Ur/omO/+ThQ+u9udxpoU87RJpUtRTUMcbWSb3ors= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 76c6f9d1-fdf2-4086-39fd-08d59db00089 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0966; x-ms-traffictypediagnostic: DM5PR2101MB0966: 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)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB0966;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0966; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(39860400002)(39380400002)(396003)(366004)(199004)(189003)(6512007)(316002)(59450400001)(6436002)(186003)(6666003)(2900100001)(8936002)(486006)(6486002)(6506007)(10290500003)(81166006)(22452003)(25786009)(1076002)(81156014)(53936002)(106356001)(10090500001)(5250100002)(107886003)(102836004)(76176011)(8676002)(66066001)(2501003)(446003)(476003)(36756003)(99286004)(575784001)(478600001)(86362001)(72206003)(2616005)(68736007)(5660300001)(305945005)(3846002)(6116002)(26005)(86612001)(14454004)(97736004)(15760500003)(3660700001)(4326008)(2906002)(110136005)(54906003)(3280700002)(105586002)(7736002)(11346002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0966;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: LIXz4r/kUsQXOZOLRKNIae6YEG5EA/INnLZx8sN9+5P0w/kavpFQI3zk+04GKQbLYb96GaUI4DT2UPV6fvtNo8tFwh5hmr8HqTOd/2GHlk/VfwIHD7SQdWHZVXd08PI7BC4hjVxu0oWhzGTMFcaydEzPygeia3exw1HM4W+Cs3390rn4wd8pp8RJ/2ZfRpTW1jr5nzRE84yzL6VggP9+riGqWlLkSY7GctKlsdEDE2EINqpMddnFwByhl8yXQ41AAk0MAxB7HQ7sxkLdhnKKtN1VWBYaCgdbEeAbwIBDkqId3PNABFY8uLkRppCNdDw5RpJSC3IXIIdXtDntgLwpX3QbpgAUJ96w1jPPBQMyCet9R+chTCyYDhmCzkqtaViZxV9Ildwf2XhQDD2b8iS/GYK66R3mhmMQ9lW626GZthQ= 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: 76c6f9d1-fdf2-4086-39fd-08d59db00089 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:19:59.7074 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0966 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 2300c02ab5e6..e24f57946a17 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