From: cgel.zte@gmail.com
To: mpe@ellerman.id.au, benh@kernel.crashing.org
Cc: paulus@samba.org, maz@kernel.org, jgg@ziepe.ca,
tglx@linutronix.de, lv.ruyi@zte.com.cn,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH] powerpc/fsl_msi: fix return error value in error handing path
Date: Mon, 25 Apr 2022 02:41:49 +0000 [thread overview]
Message-ID: <20220425024149.3437751-1-lv.ruyi@zte.com.cn> (raw)
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
next reply other threads:[~2022-04-25 2:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 2:41 cgel.zte [this message]
2022-09-27 14:35 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220425024149.3437751-1-lv.ruyi@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lv.ruyi@zte.com.cn \
--cc=maz@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®