mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
soc: mediatek: pwrap: Check return value of platform_get_irq()
Check for the return value of platform_get_irq(): if no interrupt is specified, it wouldn't make sense to call devm_request_irq(). Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220517104712.24579-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
This commit is contained in:
parent
e84187fa6f
commit
56a468b5f6
|
|
@ -2317,6 +2317,11 @@ static int pwrap_probe(struct platform_device *pdev)
|
|||
pwrap_writel(wrp, wrp->master->int1_en_all, PWRAP_INT1_EN);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
ret = irq;
|
||||
goto err_out2;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt,
|
||||
IRQF_TRIGGER_HIGH,
|
||||
"mt-pmic-pwrap", wrp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user