Skip to content

Commit

Permalink
irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init()
Browse files Browse the repository at this point in the history
If devm_platform_ioremap_resource() fails, it never returns
NULL, replace NULL check with IS_ERR().

Fixes: a6199bb ("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
  • Loading branch information
Yang Yingliang authored and Marc Zyngier committed Apr 5, 2022
1 parent fa4dcc8 commit 76ff614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-qcom-mpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 76ff614

Please sign in to comment.