summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-03-16 05:51:00 +0300
committerMarc Zyngier <maz@kernel.org>2022-04-05 18:33:13 +0300
commit76ff614a79152cee07a2c48080c3dc91c56f0f1d (patch)
tree2e997b0b2cb48fcf1051f2476945443366e817cf /drivers/irqchip
parentfa4dcc880390fbedf4118e9f88a6b13363e0a7a1 (diff)
downloadlinux-76ff614a79152cee07a2c48080c3dc91c56f0f1d.tar.xz
irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init()
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> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220316025100.1758413-1-yangyingliang@huawei.com
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-qcom-mpm.c2
1 files changed, 1 insertions, 1 deletions
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++) {