From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992492AbbEVJN0 (ORCPT ); Fri, 22 May 2015 05:13:26 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58611 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946137AbbEVJLT (ORCPT ); Fri, 22 May 2015 05:11:19 -0400 Date: Fri, 22 May 2015 02:10:06 -0700 From: tip-bot for Axel Lin Message-ID: Cc: jason@lakedaemon.net, tglx@linutronix.de, linux-kernel@vger.kernel.org, axel.lin@ingics.com, mingo@kernel.org, matthias.bgg@gmail.com, yingjoe.chen@mediatek.com, linux-mediatek@lists.infradead.org, hpa@zytor.com Reply-To: jason@lakedaemon.net, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, linux-mediatek@lists.infradead.org, yingjoe.chen@mediatek.com, mingo@kernel.org, axel.lin@ingics.com, matthias.bgg@gmail.com In-Reply-To: <1432220254.29544.1.camel@ingics.com> References: <1432220254.29544.1.camel@ingics.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irqchip: mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails Git-Commit-ID: e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c Gitweb: http://git.kernel.org/tip/e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c Author: Axel Lin AuthorDate: Thu, 21 May 2015 22:57:34 +0800 Committer: Thomas Gleixner CommitDate: Fri, 22 May 2015 11:06:47 +0200 irqchip: mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it. Signed-off-by: Axel Lin Reviewed-by: Matthias Brugger Cc: Yingjoe Chen Cc: linux-mediatek@lists.infradead.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1432220254.29544.1.camel@ingics.com Signed-off-by: Thomas Gleixner --- drivers/irqchip/irq-mtk-sysirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c index 04de2d4..15c1303 100644 --- a/drivers/irqchip/irq-mtk-sysirq.c +++ b/drivers/irqchip/irq-mtk-sysirq.c @@ -144,7 +144,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node, chip_data->intpol_base = ioremap(res.start, size); if (!chip_data->intpol_base) { pr_err("mtk_sysirq: unable to map sysirq register\n"); - ret = PTR_ERR(chip_data->intpol_base); + ret = -ENXIO; goto out_free; }