Commit 746db5d0 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Michal Simek

soc: xilinx: Do not check for 0 return after calling platform_get_irq()

There is no possible for platform_get_irq() to
return 0. Use the return value from platform_get_irq().
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230803104807.814005-3-ruanjinjie@huawei.comSigned-off-by: default avatarMichal Simek <michal.simek@amd.com>
parent c6cb31b9
...@@ -243,8 +243,8 @@ static int zynqmp_pm_probe(struct platform_device *pdev) ...@@ -243,8 +243,8 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
} }
} else if (of_property_present(pdev->dev.of_node, "interrupts")) { } else if (of_property_present(pdev->dev.of_node, "interrupts")) {
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq <= 0) if (irq < 0)
return -ENXIO; return irq;
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
zynqmp_pm_isr, zynqmp_pm_isr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment