[PATCH -next 1/2] soc: fsl: qe: Do not check for 0 return after calling platform_get_irq()
Ruan Jinjie
ruanjinjie at huawei.com
Thu Aug 3 20:48:06 AEST 2023
There is no possible for platform_get_irq() to
return 0. Use the return value from platform_get_irq().
Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com>
---
drivers/soc/fsl/qe/qe_ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c
index bbae3d39c7be..8ab6e51e4f28 100644
--- a/drivers/soc/fsl/qe/qe_ic.c
+++ b/drivers/soc/fsl/qe/qe_ic.c
@@ -435,8 +435,8 @@ static int qe_ic_init(struct platform_device *pdev)
qe_ic->virq_high = platform_get_irq(pdev, 0);
qe_ic->virq_low = platform_get_irq(pdev, 1);
- if (qe_ic->virq_low <= 0)
- return -ENODEV;
+ if (qe_ic->virq_low < 0)
+ return qe_ic->virq_low;
if (qe_ic->virq_high > 0 && qe_ic->virq_high != qe_ic->virq_low) {
low_handler = qe_ic_cascade_low;
--
2.34.1
More information about the Linuxppc-dev
mailing list