From: Axel Lin <axel.lin@ingics.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>
Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-kernel@vger.kernel.org,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Subject: [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails
Date: Thu, 21 May 2015 22:57:34 +0800 [thread overview]
Message-ID: <1432220254.29544.1.camel@ingics.com> (raw)
PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
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;
}
--
2.1.0
next reply other threads:[~2015-05-21 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 14:57 Axel Lin [this message]
2015-05-21 15:36 ` [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails Matthias Brugger
2015-05-22 9:10 ` [tip:irq/core] irqchip: mtk-sysirq: " tip-bot for Axel Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432220254.29544.1.camel@ingics.com \
--to=axel.lin@ingics.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=tglx@linutronix.de \
--cc=yingjoe.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox