From: tip-bot for Wei Yongjun <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: marc.zyngier@arm.com, weiyongjun1@huawei.com,
wangkefeng.wang@huawei.com, linux-kernel@vger.kernel.org,
jason@lakedaemon.net, hpa@zytor.com, mingo@kernel.org,
tglx@linutronix.de
Subject: [tip:irq/core] irqchip/mbigen: Fix return value check in mbigen_device_probe()
Date: Sun, 30 Apr 2017 02:45:59 -0700 [thread overview]
Message-ID: <tip-216646e4d82e847791f0ba66c439dedd36cb119f@git.kernel.org> (raw)
In-Reply-To: <20170427152113.31147-1-weiyj.lk@gmail.com>
Commit-ID: 216646e4d82e847791f0ba66c439dedd36cb119f
Gitweb: http://git.kernel.org/tip/216646e4d82e847791f0ba66c439dedd36cb119f
Author: Wei Yongjun <weiyongjun1@huawei.com>
AuthorDate: Thu, 27 Apr 2017 15:21:13 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 30 Apr 2017 11:21:16 +0200
irqchip/mbigen: Fix return value check in mbigen_device_probe()
In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). Use devm_ioremap_resource() instead of devm_ioremap()
to fix the IS_ERR() test issue.
Fixes: 76e1f77f9c26 ("irqchip/mbigen: Introduce mbigen_of_create_domain()")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/20170427152113.31147-1-weiyj.lk@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-mbigen.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 061cdb8..d2306c8 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -337,8 +337,7 @@ static int mbigen_device_probe(struct platform_device *pdev)
mgn_chip->pdev = pdev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mgn_chip->base = devm_ioremap(&pdev->dev, res->start,
- resource_size(res));
+ mgn_chip->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(mgn_chip->base))
return PTR_ERR(mgn_chip->base);
prev parent reply other threads:[~2017-04-30 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 15:21 [PATCH -next] " Wei Yongjun
2017-04-30 9:45 ` tip-bot for Wei Yongjun [this message]
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=tip-216646e4d82e847791f0ba66c439dedd36cb119f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangkefeng.wang@huawei.com \
--cc=weiyongjun1@huawei.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
Powered by JetHome