Received: by 10.213.65.68 with SMTP id h4csp1861023imn; Mon, 19 Mar 2018 15:31:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELv18kHDhy7w5r29KXefeX2GEZESkya2E3PxC9s/rC/hwYEqzTWI56/LkFQkpw7ZJURt13ez X-Received: by 10.98.35.202 with SMTP id q71mr8769636pfj.9.1521498694445; Mon, 19 Mar 2018 15:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498694; cv=none; d=google.com; s=arc-20160816; b=LOI1AC9D7N4eczzIrJud5oyRFOSksLtzCAWcEMYKo19VBELIQy1UOlPBboqEAUIbSX umTKX8AoS1iGOfN4kDhn9DYLZpGQnkmSW1Kydnv+IG1l0PZop2QB/pIEf0XR6Ekf3Pvr 5txkJMjIgHfXrID02z8vnXxbXTMxz4AwXygV/TG0z+kxGsW5PYMXz7uKAJCVHdAJ/e6v HEmr7V0Cgvzc8Ucl8SCgfU21SWypu5kMSdcU4QKEEpGa71l2ASnCnbCyudSUIUWocCNW xJfLwqGSvhNeJQTHcdx9ACFADk6dffpUAvYpggkeMJE2uiCZEP3pZhMyQ68WWs4+hCsR cehQ== 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=NoIpFtc/FySgsMBHVnfwd0meQ5Agwi05K3X/jhIqNto=; b=0Nh69PqiyGPoieDXdjKXtc0DfDlFjUH2vASE2K6rv1AssLf8CQMjy/H1RoNOVmiFE5 pk28AAuNOClxjfI0eZNiR5OItYXbGDjvO9KK4IWYV85tysxGWKIVLoUNWn0S8wveOpVY ZQD2vRxRECdLQJSoz0HAwxAoeiJsjon7gWB5rUWvGkgiEyLX8UqSgkC9fh9xbB1nyYY/ baG/1idqTUicmg2pc3I8N5fqpLSXo6MBhPJmVe0CBPMmc0MQh4DQGdHqxO2GwJla95wJ j+r67b9QXQkqDLEAZUA18mRew1MzVhTKa4aRFgk0H1v6zVVM7gd7RXpQd0GhdD7kuAx6 4qBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=E6QIYxeP; 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 o5si146120pgp.16.2018.03.19.15.31.19; Mon, 19 Mar 2018 15:31:34 -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=E6QIYxeP; 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 S933800AbeCSPso (ORCPT + 99 others); Mon, 19 Mar 2018 11:48:44 -0400 Received: from mail-cys01nam02on0114.outbound.protection.outlook.com ([104.47.37.114]:45246 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933768AbeCSPs0 (ORCPT ); Mon, 19 Mar 2018 11:48:26 -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=NoIpFtc/FySgsMBHVnfwd0meQ5Agwi05K3X/jhIqNto=; b=E6QIYxePxlylkoEVuTl3DPbCG+O5rR19NC0Gw1SUkjPOnX8HysJLOAh2jm/LjlYVJHgPS6/LHF0PAALndtrUg1hFp8ZPCYQQYpExUi/09aERn26RMR091THn2CFpSzqW+n1I6CEbiZqvabvwKHHl0uGu5LGCskz79wjxYRJpO90= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0998.namprd21.prod.outlook.com (52.132.133.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.0; Mon, 19 Mar 2018 15:48:09 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:48:09 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Wei Yongjun , Marc Zyngier , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 045/124] irqchip/ompic: fix return value check in ompic_of_init() Thread-Topic: [PATCH AUTOSEL for 4.15 045/124] irqchip/ompic: fix return value check in ompic_of_init() Thread-Index: AQHTv5mgh/9BTvdfCkGepsDirNXE+g== Date: Mon, 19 Mar 2018 15:47:46 +0000 Message-ID: <20180319154645.11350-45-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-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;DM5PR2101MB0998;7:pdAgVp7fYatlyqzIp/h41D0mEnkJlp8fk4XvRq9uQO/joZItVjKEegWAPEfEmOCdDQHGASXmrpsbn3O6A3G7hS819MA7AnhAVI4z1ODwp4yvgKdVN3VVnUPINlhF4m/QhR6ca8Ht94AdqgLf2mjkuNN/LQmePqTtr4b7Z/GDXEri2CwZQl4dr19avWQNqxT+Epuhp9xlkgjvDipTopBPgkxdZDDaD2RQkfTRsWh5wzPHCnXfQs9GI2kVuZyyUjvg;20:c12WzIYpVjwKfVCSuhmL2/Hm0IcmvVD9LPEh1Icl5z0rkWYiJXZ7lh2hUhUyvY/hNmjXq/4/t2X+fEp7WhnUGrUWQD1tE4oP0M0idTE0RYBq1RqZl1tjSSS8flU1xqlNP7kWloRqCScF1H1yrBL3fiquxrAxsFkP4fyYVZkdl/s= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7c32a39f-8d3f-44db-ad3a-08d58db0d097 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0998; x-ms-traffictypediagnostic: DM5PR2101MB0998: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171)(50582790962513)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0998;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0998; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(366004)(376002)(396003)(346002)(199004)(189003)(3846002)(6116002)(8936002)(6486002)(102836004)(68736007)(6506007)(2900100001)(22452003)(25786009)(3660700001)(7736002)(76176011)(6512007)(72206003)(86362001)(575784001)(53936002)(8676002)(81156014)(6436002)(81166006)(305945005)(478600001)(99286004)(2950100002)(14454004)(6666003)(10290500003)(186003)(107886003)(2501003)(106356001)(26005)(86612001)(97736004)(5660300001)(10090500001)(110136005)(54906003)(316002)(2906002)(66066001)(105586002)(4326008)(36756003)(3280700002)(1076002)(5250100002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0998;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: 2fetDnKOqPPOpP2dRYnZrApnXkR1e2tAuynbNKivKUy17eHdlULNpZW+Lm3UkecnimDzVpYAafwk59PYbQa22YLIGQQHvoSO/N+F0sYZ5feUX4kK5XmMNd7VmCAefdy0JWZKQxLT7wphmD0VoGNf8x/gvkU7pgh3hXAOoZyDPx/1MgHLFIyjvuDDp+OfiKtlWGmK8AQM3hHvDQ8ZmlGBBhU51KiN117qsiknATyrcOjmsjqgPtREF/BuWx3ygWPbiQsByWdyXU0ljmkaRj2ww+tq7YBZTZAa7NQ8/qkVF64jDGyHUT1KFbfwY742gx24I+YGca2valwf6hRN+zD51A== 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: 7c32a39f-8d3f-44db-ad3a-08d58db0d097 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:47:46.5743 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0998 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit 404e6bea10662f0e142748353169d25378271e49 ] In case of error, the function ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 9b54470afd83 ("irqchip: add initial support for ompic") Acked-by: Stafford Horne Signed-off-by: Wei Yongjun Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-ompic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-ompic.c b/drivers/irqchip/irq-ompic.c index cf6d0c455518..e66ef4373b1e 100644 --- a/drivers/irqchip/irq-ompic.c +++ b/drivers/irqchip/irq-ompic.c @@ -171,9 +171,9 @@ static int __init ompic_of_init(struct device_node *nod= e, =20 /* Setup the device */ ompic_base =3D ioremap(res.start, resource_size(&res)); - if (IS_ERR(ompic_base)) { + if (!ompic_base) { pr_err("ompic: unable to map registers"); - return PTR_ERR(ompic_base); + return -ENOMEM; } =20 irq =3D irq_of_parse_and_map(node, 0); --=20 2.14.1