lkml.org 
[lkml]   [2022]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] powerpc/fsl_msi: fix return error value in error handing path
Date
From: Lv Ruyi <lv.ruyi@zte.com.cn>

This function fsl_msi_setup_hwirq() seems to return zero on success and
non-zero on failure, but it returns zero in error handing path.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
---
arch/powerpc/sysdev/fsl_msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index b3475ae9f236..10f974cfa2f3 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -353,7 +353,7 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
if (!virt_msir) {
dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
__func__, irq_index);
- return 0;
+ return -EINVAL;
}

cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
--
2.25.1
\
 
 \ /
  Last update: 2022-04-25 04:43    [W:0.036 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site