Received: by 10.213.65.68 with SMTP id h4csp2114362imn; Sun, 8 Apr 2018 20:04:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx495gzRzy8BsmJHY1Uhdvos7Rn4W/0VmKPo8OljjHv/mhXdiik0gjqHxmjvlpXq3VOUtsWDQ X-Received: by 10.99.95.214 with SMTP id t205mr24186146pgb.145.1523243075826; Sun, 08 Apr 2018 20:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243075; cv=none; d=google.com; s=arc-20160816; b=Dube17PeFeXwRyBoyw+a7fSQZ6eqZmO6UUzuXZaAgnqGNUnzEQhTmU/buR8eNc70gw 2cuRw6kF6OVkmu/ea2L9v2DoMRUTexyFLswax6PN5jWtz5vOQa/ReflxTzNpXQ2kl1/t c3bHJuAAz5yQet19JLysl+vyZ62drAe6yTDdhPoVV7VFh6xYJ0zfnH0XA+YHVciAXWgV wwX3hOMUUAyJBj5CD2aUYbF1LM0nJL0Hv6wHQ0SqybVro0jg/e09KrY7RYdTqOgNwUag GRSXG8sPBGj9RDRO9LyH4LGqBX1NgjhkYnAFFQiqYMnFyv5YaYuOIe6D1Y4+TgdZyM0J xhDg== 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=Sv6reaFl2Aiin+6yeH1tpAamhb4GD1RWhhVvsjvApwQ=; b=Q8TBofZ00IxfgkQ4aSs2zL/V7r/eCOklyb30LIU++9kBSBL6q4voVc/BysYoctXRjD OSlegS9z0E0Q7QXwR0Cc9tbWcipbrUAJ26WoNhU1VlmM1d50k2RKYfQu3C7BNlhDRyLj H9Q1dekuFqHjfY1tjCZx87szp5h/DqzD+z3C+4V+pOMWSU7QcQke2ZY2k5BTf0Ib5o7B wJCzqUm57uC5Rp1htIpcSuNv+3T2afjG3+oQa6l0aEMAKB82coaveo6aQKkzj87qIIal Aw0v89SbRrPbhOZFRwiVOYeM26qVKHDXsapR7P36yGjKPpkxb4WR8kTyAlOM6tDcD2eU wEAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=fFSYqVu2; 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 b9-v6si8245802plb.160.2018.04.08.20.03.59; Sun, 08 Apr 2018 20:04:35 -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=fFSYqVu2; 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 S1756162AbeDIAas (ORCPT + 99 others); Sun, 8 Apr 2018 20:30:48 -0400 Received: from mail-dm3nam03on0114.outbound.protection.outlook.com ([104.47.41.114]:52647 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756123AbeDIAai (ORCPT ); Sun, 8 Apr 2018 20:30:38 -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=Sv6reaFl2Aiin+6yeH1tpAamhb4GD1RWhhVvsjvApwQ=; b=fFSYqVu24rPtemG2B15ykBv2QMgYvI7rvDcJZOcI3sJdLNEAgsVvDWcj+m0+rICaBzDIbJQh7MWvLrEFuPjDptMECbhAdogobhtZt+uM9YzSP8ihJkVfJY4DrbLiAgySS2PlOndFnwhKh9CjHun+z2+WcLRIV9kl4AxbtfjhKV4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0807.namprd21.prod.outlook.com (10.167.110.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.3; Mon, 9 Apr 2018 00:30:32 +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:30:32 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dan Carpenter , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 148/293] scsi: bnx2i: missing error code in bnx2i_ep_connect() Thread-Topic: [PATCH AUTOSEL for 4.9 148/293] scsi: bnx2i: missing error code in bnx2i_ep_connect() Thread-Index: AQHTz5krFuuJnnjrUUqM3fz/AYPDZQ== Date: Mon, 9 Apr 2018 00:24:49 +0000 Message-ID: <20180409002239.163177-148-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-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;DM5PR2101MB0807;7:dXW8qJaYcW/VcVin6Jm5RR95I7/j+j8qBklpcm+wx4xZM71U5tL5A4+/sXVaCvlJw8jcZZc/Qv/xYvFRCWQYLtDf23z5Q/w+8vth6b1f73Xp0QmHpLWYx9l45L2jDUgv8xYc/A2k7X1jUKzXEwftzT/xYLIwJzaBQ/45QLmIoYWuksW8DHTAMLqpJf9x94GR4aqvrruCon9/+5Eg1Y+GURLn5PksnpdssTrk5NCBRRlmdo5mXLWON4T9I9PuxB37;20:D9mgdH5yTgIb3J+RU+ztBDMmulMJeKGnCxH1vEz1R9T30zVyRN8AKxVoZ8twUx882R/cb4zBQ5xX/xC2B1f+r38/Iveo8WrCmH6rlliJ7zH8GOpPWumWTCcpGCCGrQeP9pUYALu3jo3zPAvMQjviqdT24pLO44nDki85lp5XwzQ= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 61222de6-9cdb-4f25-a4dd-08d59db11aec x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0807; x-ms-traffictypediagnostic: DM5PR2101MB0807: 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)(10201501046)(3231221)(944501327)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0807;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0807; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(396003)(366004)(376002)(346002)(199004)(189003)(14454004)(4326008)(54906003)(25786009)(53936002)(2900100001)(1076002)(3280700002)(6486002)(186003)(2616005)(68736007)(110136005)(11346002)(10090500001)(6116002)(107886003)(3846002)(36756003)(8676002)(72206003)(22452003)(66066001)(26005)(6512007)(478600001)(3660700001)(81156014)(86362001)(15760500003)(81166006)(86612001)(7736002)(305945005)(8936002)(10290500003)(6436002)(105586002)(6666003)(316002)(575784001)(59450400001)(76176011)(5660300001)(476003)(106356001)(2906002)(6506007)(446003)(2501003)(99286004)(5250100002)(486006)(102836004)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0807;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: f0be+0sG6FbFc6GZ1Rvh6AuzRKu5gWoaNSSMnECeerrv1O0Lr9X+qw4LmbGTTZxKOLje9CI+8JYghCqZK5wPQy0xk+A6OD0rVSV4M566XtTl+baYYH/15JQYLyBJEIgW9imbEzUSfm1nTCG1p89tTyxXE5ajfM9ohiY3C8wuSozNoQyZx1w1BIn+IJMAFiU1DCY40Nv7L2CYOiTlGLiv5exqFFsHVAkPKLXKZmW/aJsy1eebhVcFw1m8Gwyy3R1xzSXok1gNKeqTO2f44/Ou815htowjCaNk4/9ktLTXDGobDayunbageo3PAJel2d0OXEKdX5Fe/Vv1k07ALdOrrcJwp/RIzxnOwx/nJsxKpDTX4bM6S6cXIz/5UH26GOdohgFT7PuGs3/mFp2TqcXRIE5TQGf2PnOLoxOUdtv5H2U= 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: 61222de6-9cdb-4f25-a4dd-08d59db11aec X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:49.3469 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0807 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 1d32a62c74b3bcb69822b0f4745af5410cfec3a7 ] If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead of an error pointer. It results in a NULL dereference in iscsi_if_ep_connect(). Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.") Signed-off-by: Dan Carpenter Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/bnx2i/bnx2i_iscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_is= csi.c index 133901fd3e35..24c920d3ffb2 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -1909,7 +1909,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct= Scsi_Host *shost, =20 bnx2i_ep_active_list_add(hba, bnx2i_ep); =20 - if (bnx2i_map_ep_dbell_regs(bnx2i_ep)) + rc =3D bnx2i_map_ep_dbell_regs(bnx2i_ep); + if (rc) goto del_active_ep; =20 mutex_unlock(&hba->net_dev_lock); --=20 2.15.1