From patchwork Wed Aug 8 03:39:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10559477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51EC814E5 for ; Wed, 8 Aug 2018 03:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FD022A43A for ; Wed, 8 Aug 2018 03:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 325842A45F; Wed, 8 Aug 2018 03:40:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E2492A43A for ; Wed, 8 Aug 2018 03:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbeHHF5c (ORCPT ); Wed, 8 Aug 2018 01:57:32 -0400 Received: from mail-eopbgr680044.outbound.protection.outlook.com ([40.107.68.44]:39540 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726745AbeHHF5c (ORCPT ); Wed, 8 Aug 2018 01:57:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=azAB6vMEwC6M/5aC/TizjGIk7s3Y0x7/JWfaYuE0L7s=; b=fKDHoBGkq60Os4tTuLitTVmcaEBYj5T44sEKmAgwyg/cqjmw8+v8hNU4MmqB+hXNwTBCRWw2aQ3oHMuwe1tXtajpFqJP38yMqpeY3d3/kSu5uDhjXZHaavsaJlR4s4m1vD138+tmm37mRFldazOTJoMIy7xqCxIitD9+XPhJXNc= Received: from CO2PR07CA0055.namprd07.prod.outlook.com (2603:10b6:100::23) by CY1PR07MB1464.namprd07.prod.outlook.com (2a01:111:e400:50eb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Wed, 8 Aug 2018 03:39:55 +0000 Received: from DM3NAM05FT044.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::201) by CO2PR07CA0055.outlook.office365.com (2603:10b6:100::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1038.19 via Frontend Transport; Wed, 8 Aug 2018 03:39:54 +0000 Authentication-Results: spf=pass (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by DM3NAM05FT044.mail.protection.outlook.com (10.152.98.157) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1038.3 via Frontend Transport; Wed, 8 Aug 2018 03:39:54 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Tue, 7 Aug 2018 20:39:51 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id w783dqRp021047; Tue, 7 Aug 2018 20:39:52 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w783dqkF021046; Tue, 7 Aug 2018 20:39:52 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH] qla2xxx: Fix issue reported by static checker for qla2x00_els_dcmd2_sp_done() Date: Tue, 7 Aug 2018 20:39:52 -0700 Message-ID: <20180808033952.21012-1-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(39850400004)(396003)(376002)(346002)(2980300002)(438002)(199004)(189003)(478600001)(72206003)(15760500003)(8936002)(336012)(110136005)(316002)(16586007)(42186006)(81156014)(47776003)(186003)(81166006)(1857600001)(5660300001)(69596002)(486006)(80596001)(1076002)(8676002)(44832011)(476003)(50226002)(51416003)(86362001)(106466001)(106002)(50466002)(2616005)(126002)(36756003)(305945005)(2906002)(48376002)(54906003)(87636003)(4326008)(356003)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB1464;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT044;1:kMXTEvjp0+OK1foZEOlk+kcpsTpc58ED0RCz0mz2zirC8CV8oCoMDKHZy4+PkUQcieNnheDlVgBniZWPN9QkB4Zl4mYS4acaTpwvdKuJ47HRZOf7kccRemabvftfNk6S X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d5b8c2f0-28c5-4fc0-5183-08d5fce09b21 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:CY1PR07MB1464; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB1464;3:K0dLex50xwcn6cRkNMce/GdptmPX7nqpkpcOSH9IUsOLkdOqjuNeO6806eX7eC0/I3z1Q/vPH/VcqoXEO5IHLz55S3pa2eqdvcOWmjTMxsURB4GvrSDu7bjtFHZSBU/2FvY/kGjITxsSz6f31hoMU4L5XsYJXUDi5wMD001OYJPKqEZb9h/2kcby6CDnHeMJDZfR7zARU00fE+/5ihP0vpoAshg0ThL9NGeji2siSVnRobP5qkQykARlWaEyRe4AUdxPnoSJRRhHt9bIBqKb3f/K/lN/eMLduI+lHN54Q8Cgugb5l23aR+G+x1CHUK/IX70V89qcd2vZqFgD2gtHpY2z1chlnrlWhASwwHc+gJw=;25:NDsFfbWAnTaDuST2DvM54fsl0z2OrjTHbs25VZ+bRcrfQ8SkCV/RkwUgXBaVPYS3npbZQ+kJdAAZS+ZctvJRq9T6yaRJDt3dnCnHQsFVKxQ5bGIUWpLhzRuS7jU70E7pNkoJY5rZi2QZZ4Qn/Dz/i9FU0qwr438hqFPfTGx+GRPUZCBAr9LmrbRS00ZxZRDnfxVDG+WGMu9lKucMwJROyGqbhymnC5/mpDeqR8RxmTdAPXxXs2NSlMlwv2xielbur7PfPGLoLXzdtj3qKPCDmcgfj0rbnl2JTVxOmm7pK7BvF97xk866blgxEwEJxfWU2HQqVr+thpK+WP/ElnKhPA== X-MS-TrafficTypeDiagnostic: CY1PR07MB1464: X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB1464;31:FG1zCPADq+Skvvir8LC4KPL1ou1Hy/aECyJcY7elpP1B3Guu26/fE1c/kML0seMICb73oLLBbxXYjDBXF32hPtwt3LlFRD+ufhdv8+yG/hkE2feStF9DZixhcEif9BmtMxwnUe0zHnYBWNgt7uEwFxciX0LDIF4A5w2fkqCCmCY2AY9Bai3dqUL4PG3UoslmYezMBX0MlYVmne9ARfcAJFZl6CJ9+/UgF2VFk/w2E+8=;20:dTgM4caMqQtzLu8l6X0KufzaLCsIg3KaVP/osXxYCdboGLwAoXoU4mAgSIk5ge6Js8fSLPr9Ewq9aaanvf1mcFgr4NDm/mqKo9Eg3ORkT5iXT6RiRwf+s//xfQLmfLSZxcO1vCzfxMoIVa8+6wj8inm1g622QhD5cQOCVbedvWImwmIX7mI2+PQcVflYYK2B4YTeaJ35goooBnJOX0qX6K3hTAzi6Seg23vM3MCKKiQaLbZc6rj/4df+W2zrtYgVHxaip2wPlvMC19Q5M0ZhQlty4yjTjhElcT0KN4kWP33GZzpzohnK4LnqwvELlXRpd6wBDnb41B5UH9ZgJm5JBbdcsPEqy2RYeo7EJNRZsb1wL/xcVlLi0gT8pc2/jG7WIFhOqhfgpPzdHpp4LNWYuyN4Ox4MOp4F3CiUHEiorFiROfPZQT0QBSZr4Acv2GRXtGZagFoirUccLjx3n8HRNiUroEdpOPuoBhr2rSEzyPB1Hl4H++Kb2kctj0/aQhfe X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(146099531331640); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:CY1PR07MB1464;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB1464; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB1464;4:5qJgv0uth+7hC7BXGbsHaw2XyAZ2xbXxt8IxyYpvDrAMvlpHENstj2EIuqjbOEjzUu69BrrJWa9jQjbIA6S3OdiLJ96EoIzcDnR4HiFG1p6YaPt4zMEDt7eIGUfK3HhOt2R89xAsjVb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UTKCPYB1meGV2W9X20qiscZTJK+cnqOGWrbNtK/Pl8CgNsu+L4TSdMHMrhIMi1sDfQcNprtJFBsqvcc23YYqkgNQXMGkl6Q==;5:IqAwcd+HHorH9OLToalNosFO1RmWypnULAr2+85pp69h5UFsaJDIwhRl3ws9ckIAnPdKwIyyfKUtq/N7fcIGMtIUGp/3PiLwLbOrTaYKEtQFo0LjU0t9RY8xOcZbGNSOKDzEVSEZwSzfAxyAwgPiHgiO6uvZHImJJKuJe/qc6FU=;7:Dpzosh0fZXupXbpqyYle8JXrRMJd93P0mGQ6iyKbHKGa1rmstSgFT2kZLymxAQQav/zzy+9RpB6ccKnzrnVrYQj9SXLIV+vXSy0h8UHzTQFDLIv7bcYaOZ9Hs6sIDgcXslMQUhcmel1dqugJOXm4NJAX2bprYJiZeGwaE3xrHSb+NQvFVIyDVqnmgw86wAjNBWVi4idCcCLZNHEHNwMKX3PNMoVMh9xg6JHXu6hqgT2NVlUg4LlZYTYbXgpmBsEY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2018 03:39:54.5194 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d5b8c2f0-28c5-4fc0-5183-08d5fce09b21 X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194;Ip=[50.232.66.26];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB1464 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran This patch fixes following Smatch complaint: drivers/scsi/qla2xxx/qla_iocb.c:2647 qla2x00_els_dcmd2_sp_done() error: we previously assumed 'e' could be null (see line 2631) Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Reported-by: Dan Carpenter Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_iocb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 059f2c9dc192..213321295753 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2642,6 +2642,7 @@ qla2x00_els_dcmd2_sp_done(void *ptr, int res) elsio->u.els_plogi.els_resp_pyld, elsio->u.els_plogi.els_resp_pyld_dma); sp->free(sp); + return; } e->u.iosb.sp = sp; qla2x00_post_work(vha, e);