Received: by 10.213.65.68 with SMTP id h4csp2122685imn; Sun, 8 Apr 2018 20:15:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4++YR5FjapABPPhcfHKNATUdSu2WN5budNylCCa9XS03mgde7x+En6zzmJH3uxtH8VvEKj3 X-Received: by 2002:a17:902:a501:: with SMTP id s1-v6mr37093159plq.201.1523243391558; Sun, 08 Apr 2018 20:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243391; cv=none; d=google.com; s=arc-20160816; b=encnReGXZJZGWSMwZu5zZISdaG5b+B6RIEC950NUmAeUW89MlApYqQJJrZu8m775o6 I9m5P661T1b4tLHiqtmJSBPs/I8OxQtg6jxEVA4DGo+ozx3ATxKENlTwx0IJM79mUCM2 RrSRZmlaHyC4XdpikDP994eTVB3H1rGDx66ctrNQWc1GxGpjA79vYIgkq7KwpxXz18oy 6HzkxDHY9ods95PJuetT54EzHi4xzdn4j/STk1/0wwBf3z6E/gJAZcJ2zQCwMAMQbeRV 6Gs8Vf9JXYHrH1PyLFZf8CBXHDWtzCDTE7s+4HoEdUfHm1tls82HfR505rJaPljn6pJX 7WvA== 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=DVEHcRRX9SrUJPqQJ6jTT7zkLBPHlnA6r8i38qyH6Yo=; b=mCaGZ8tgr5Y4aNZY1UU4LExRd676GlxSBW1lrEKOKy3/JdlD9uogBHpyhHGN0Dbd6D AQCjpAojGyqju+2zxfGGBS9AHCTocdSfPMLOfNRa4ZvPRi8WVtjqTFVOoDMFaKPVuWVj LBGaqHeLlXE8cI2yIY6mAHoMI8Z4094v1o3a9lKzXeUocTs0U1YPk1+pAHOzVPP08NAV 3UR11fRvLPw6sYgI5UyW3nIXIjUmqn7AkUYoQWT8iFObzQikKa1uWPKlD90G12U2GZSJ xt4QUhjQYevmR/FBQvHL/dZ/RJi+N7UvSexg5fvqJ7kRTAKXQ7XHX7C6Fa9x79L18Vt0 Hd0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=jpcV/0L0; 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 a63-v6si13433905pla.718.2018.04.08.20.09.14; Sun, 08 Apr 2018 20:09:51 -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=jpcV/0L0; 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 S932790AbeDIBXs (ORCPT + 99 others); Sun, 8 Apr 2018 21:23:48 -0400 Received: from mail-sn1nam02on0113.outbound.protection.outlook.com ([104.47.36.113]:53303 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932715AbeDIAhA (ORCPT ); Sun, 8 Apr 2018 20:37:00 -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=DVEHcRRX9SrUJPqQJ6jTT7zkLBPHlnA6r8i38qyH6Yo=; b=jpcV/0L0gKPzqm2xaIfHbPaoaqnufueLw4SXEZCdyhJRnorh4AoQs+Qcu/2ZhCJXcJE8SpgZaKj5uqMcRCb3/Wbp/b/neEAX2UatqofCd+/54D+OFamwxhJeEF9E46BiaU2SQUZ654p0okuyKHUZ1gwtet8zMNGPOTbuARfD0AA= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0885.namprd21.prod.outlook.com (52.132.132.154) 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:36:58 +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:36:58 +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.4 074/162] scsi: bnx2i: missing error code in bnx2i_ep_connect() Thread-Topic: [PATCH AUTOSEL for 4.4 074/162] scsi: bnx2i: missing error code in bnx2i_ep_connect() Thread-Index: AQHTz5mzCXSQfkcuIUu77rGZ6izHVQ== Date: Mon, 9 Apr 2018 00:28:37 +0000 Message-ID: <20180409002738.163941-74-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB0885;7:2uzCna03uWo6ofZ0FL991GJGLBXIX8/Ej8WFwM9HwgLY91dl70u3FcULO46aJTYEQ44ZPzzkqTv+tWAAoXXX6Ofi70u2GBtOODeELY/GVKuONs2Mo0uEw9pSUIuexrYHtYTcyFeFp0oLYpxRUixnrcYOcDuONOeEsk3PcBciHKklWkcpBzKe8lJWNLTDZ+14eSHhOLttznDUKyqZQbGCnPtksS3WUFTY3Z25RzWIKE5cgvtobVJryhjbezLQdOF5;20:Oa0EK7ArYZmdin1vc7ItMaSiVyzEm+PWoqBVWIqtb7T1J5M7KsBayLntEM3reUSjdC+QP8v5WoQdqxAUH5chng3fuh95EUihwGWPXf8Rih32/otR8wGUXD7xNS//JBrVkbCcHf7CoGq74PDuhYzsYxNNlqhtr7MHT1cjM7jh3rI= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: e9bf97b6-6563-4391-4f89-08d59db20098 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0885; x-ms-traffictypediagnostic: DM5PR2101MB0885: 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)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0885;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0885; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(396003)(376002)(39860400002)(366004)(346002)(199004)(189003)(66066001)(575784001)(3846002)(6116002)(59450400001)(86362001)(305945005)(10290500003)(6436002)(5250100002)(3280700002)(10090500001)(3660700001)(6506007)(2501003)(107886003)(446003)(53936002)(11346002)(2616005)(26005)(76176011)(7736002)(478600001)(476003)(81156014)(25786009)(8676002)(81166006)(186003)(8936002)(4326008)(97736004)(102836004)(15760500003)(99286004)(14454004)(36756003)(6512007)(316002)(2906002)(22452003)(68736007)(54906003)(110136005)(486006)(6486002)(6666003)(5660300001)(2900100001)(1076002)(72206003)(86612001)(105586002)(106356001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0885;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: fkhVd7yrOvjvTLfPZwDLVSQUri1dUW9bIjPJk060qEUhOyItTiY9NH/HW2rbkHRTTSqeRAW1vYEMkx3YbF3rVjp+UBfjBfzIL3rG7etfMUdnIjd+VF0A8O9g3UWdN/e0ZZlaGonQIAHkT7x1BBtAhbO1PYylIMuKZ9XaIuaSfKgdY8C0eWCUEwEh6zy1qR5gvLJkXqxqoo8GfpzAAAzLfaBiTojZWuHEaSxBLjIgFN/KZNT8Zalz7IKOwKdLTM3z9x7a1F+5YsnYgtIi6C4KnmzXVWHvMORhDbVxgQZIyG08oLDv9h4smigCrIbRvvgreYM2NuGBkjHuUkA514aQhNKEGqX9tMYx3gcenoUfnXhPjYiT+JU26mOOzAw0UsywDkA/+oWLqfiazOWkawQsnXxYVcvXa3YB1CnvDa4AD3o= 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: e9bf97b6-6563-4391-4f89-08d59db20098 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:37.9583 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0885 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 72894378ffcf..94ee4bbc0505 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