diff mbox series

[-next,1/2] soc: fsl: qe: Do not check for 0 return after calling platform_get_irq()

Message ID 20230803104807.814005-2-ruanjinjie@huawei.com (mailing list archive)
State New, archived
Headers show
Series soc: Do not check for 0 return after calling platform_get_irq() | expand

Commit Message

Jinjie Ruan Aug. 3, 2023, 10:48 a.m. UTC
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@huawei.com>
---
 drivers/soc/fsl/qe/qe_ic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;