All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init()
@ 2022-03-16  2:51 Yang Yingliang
  2022-03-16  2:48 ` Shawn Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-03-16  2:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: maz, shawn.guo

If devm_platform_ioremap_resource() fails, it never returns
NULL, replace NULL check with IS_ERR().

Fixes: a6199bb514d8 ("irqchip: Add Qualcomm MPM controller driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/irqchip/irq-qcom-mpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-qcom-mpm.c b/drivers/irqchip/irq-qcom-mpm.c
index eea5a753618c..d30614661eea 100644
--- a/drivers/irqchip/irq-qcom-mpm.c
+++ b/drivers/irqchip/irq-qcom-mpm.c
@@ -375,7 +375,7 @@ static int qcom_mpm_init(struct device_node *np, struct device_node *parent)
 	raw_spin_lock_init(&priv->lock);
 
 	priv->base = devm_platform_ioremap_resource(pdev, 0);
-	if (!priv->base)
+	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);
 
 	for (i = 0; i < priv->reg_stride; i++) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-05 23:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-16  2:51 [PATCH -next] irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init() Yang Yingliang
2022-03-16  2:48 ` Shawn Guo
2022-03-17 15:33 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang
2022-04-05 15:40 ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Yang Yingliang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.