Received: by 10.192.165.156 with SMTP id m28csp72365imm; Tue, 10 Apr 2018 16:41:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+e1EG7fkWFCCYrhg+AulJS0OrA/aPT32OGvHv6TFPgu9rn2y4Tt4vDwXRFbGR6cZbVa/8/ X-Received: by 2002:a17:902:2be4:: with SMTP id l91-v6mr2561999plb.102.1523403687560; Tue, 10 Apr 2018 16:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523403687; cv=none; d=google.com; s=arc-20160816; b=KXCWpxredw6D5QvL66msWPauudf6L68fZV0gVXNX7I87Rx+YJLaE492NF7ZoSEUs8U Ga2s7QEZxbVFAfr2NSXsId0Gx2J2ddiQ+mmCnZulkUjDZP1Uj8f9ro2kbSaAvoxLLl5g Cey8M7CF1B5aVRzn+hD57iZJ9X19gef3ISWa4LyYEM+TxBf8MUDsp1uBf2GPIudiPsD1 VwhInKAvtxq9pUyWxYYiThJ+JKgvP8sZko6PJlj5mNSxjjYvMQTSOjIuNhzg4Y7d/gG9 KO9ffG0MdX83VA3nHsT4drbnJL+8MFoDorLh0ccf1A2w0z4apI28SbUqnYl8lO052dyV uCJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZFqV/FZDeAL2la2l7jm3FnhP4v0WLagaSTQJuYFgnow=; b=a2pT7t+/fdw1StQT1V/8fx+xCIaRYhjGzOxulHRjFvCKvTXlCE08bbNuLTQCJMJbVm qVTd4zscOg56mzIjoQJxLLDdYFHEZYC2Y1XsYKoOOxbOeZBrD+Sgt+H0GaPc2ecZbXsS 8cyIq7qz8Ee4cvGfuZKlLe4d+HC3p5XPYNu9Gjkk9T4C1usrWLEtj3Vsi8XR8pr5JKWa nzEOgEwYDbnLqaAddGiTm2XEknloLB5uJNWNASFbyUkF2SWQKOxz2HF2Y7r/P/iCmp6d VB73ZCPJUNSovqp7XJPPsfag+SGMhVTOKNR63cZr0kkBr/NZOZYbLjbGtJPWlBAFQLgR cPXw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si3452657pln.234.2018.04.10.16.40.50; Tue, 10 Apr 2018 16:41:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843AbeDJXgG (ORCPT + 99 others); Tue, 10 Apr 2018 19:36:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37900 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724AbeDJW1e (ORCPT ); Tue, 10 Apr 2018 18:27:34 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 58DE5CC4; Tue, 10 Apr 2018 22:27:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stafford Horne , Wei Yongjun , Marc Zyngier , Sasha Levin Subject: [PATCH 4.15 042/168] irqchip/ompic: fix return value check in ompic_of_init() Date: Wed, 11 Apr 2018 00:23:04 +0200 Message-Id: <20180410212801.998320075@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/irqchip/irq-ompic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/irqchip/irq-ompic.c +++ b/drivers/irqchip/irq-ompic.c @@ -171,9 +171,9 @@ static int __init ompic_of_init(struct d /* Setup the device */ ompic_base = 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; } irq = irq_of_parse_and_map(node, 0);