From patchwork Sat Oct 13 10:22:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10640101 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 0C855925 for ; Sat, 13 Oct 2018 10:23:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04D9E2B216 for ; Sat, 13 Oct 2018 10:23:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E813B2AFFC; Sat, 13 Oct 2018 10:23:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9685A2AFFC for ; Sat, 13 Oct 2018 10:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DkqXFi5+AxaehNkVZLCIYvAVEybjbvMAQFd2+HRUIJM=; b=kSPiHS5eybmrFW 9HaWowv4Vf19yX1db6nekOPhQ7V3bXfyCYNjK6KUZB8SxT4RdUfXzCrqt3AEN+RHWb/6ClFFAuEIs 0UA9hvXRpx7WGXAzSRQTDwSSosE7DhxnM5LtKBqSI0y5uf/1br7rUL1FVVLVWWIYX6c4P6EqRDWST TH1JFQzP1Rqvsa2T2RtBNegyTOVGyu3W7R5xzZXmc5bt0NdL/1HyJnF2IfDEFlhrdYtyJueN4F9Am O/Kg8kMyvDEQfKWbjF0RqYfFhoix4YvC6/9dKc6j4wtg2dQlb/YWjGQh6oI/Q04PuRUi9xek9RtU2 eQWc8oHSX17fMeKu+jTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBH5B-0007SD-VN; Sat, 13 Oct 2018 10:23:41 +0000 Received: from userp2130.oracle.com ([156.151.31.86]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBH58-0007Ql-FR for linux-arm-kernel@lists.infradead.org; Sat, 13 Oct 2018 10:23:39 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9DAK00D054726; Sat, 13 Oct 2018 10:23:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=MAqXOtOyCFFbwNmmD7qG4qpcEI4bIPAYk5F0inknnNk=; b=HYsbtWObGiFDLUHmIysGgzUFZej5HPexmQ+n46aJSiNm4fB95R712/cBY0YXnyqbI8Jh hw+NjBfBUESAXbcibbXeycaI0V/6Q6AdcG2kfGErGStW1BWk3bL1ad8IaRALk1dH79eH dPaUHUjdVE3cl+9yr8JLAvw0YSnemRHiSMoKB37QrKPdktumxGqqyk32+DFVHX1jHdZO poOxQh5rPZqhZq5KqvUpd35HccemdrOK+O+ZpnyeGTE4c5v0LqPKdzv6T1C4cVivrxf9 NnpvriQ6nvhKYWDaYakjdqWnM6goaJRWeq6mMxXvH7Cf3xC23hxASd/arTy9sSd80RXo XA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2n384thagv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Oct 2018 10:23:03 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9DAN2eY001467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Oct 2018 10:23:02 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9DAMrsO008300; Sat, 13 Oct 2018 10:22:54 GMT Received: from mwanda (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Oct 2018 10:22:53 +0000 Date: Sat, 13 Oct 2018 13:22:46 +0300 From: Dan Carpenter To: Jason Cooper , Miquel Raynal Subject: [PATCH] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe Message-ID: <20181013102246.GD16086@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9044 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=944 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810130099 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181013_032338_656601_CB275F69 X-CRM114-Status: GOOD ( 17.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Marc Zyngier , Gregory Clement , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The devm_ioremap_resource() function never returns NULL, it returns error pointers. Fixes: 61ce8d8d8a81 ("irqchip/irq-mvebu-sei: Add new driver for Marvell SEI") Signed-off-by: Dan Carpenter Reviewed-by: Miquel Raynal --- drivers/irqchip/irq-mvebu-sei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-sei.c index 566d69a2edbc..add4c9c934c8 100644 --- a/drivers/irqchip/irq-mvebu-sei.c +++ b/drivers/irqchip/irq-mvebu-sei.c @@ -384,9 +384,9 @@ static int mvebu_sei_probe(struct platform_device *pdev) sei->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sei->base = devm_ioremap_resource(sei->dev, sei->res); - if (!sei->base) { + if (IS_ERR(sei->base)) { dev_err(sei->dev, "Failed to remap SEI resource\n"); - return -ENODEV; + return PTR_ERR(sei->base); } /* Retrieve the SEI capabilities with the interrupt ranges */