linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ruan Jinjie <ruanjinjie@huawei.com>
To: <linuxppc-dev@lists.ozlabs.org>,
	<linux-arm-kernel@lists.infradead.org>, <qiang.zhao@nxp.com>,
	<leoyang.li@nxp.com>, <michal.simek@amd.com>, <robh@kernel.org>
Cc: ruanjinjie@huawei.com
Subject: [PATCH -next 1/2] soc: fsl: qe: Do not check for 0 return after calling platform_get_irq()
Date: Thu, 3 Aug 2023 18:48:06 +0800	[thread overview]
Message-ID: <20230803104807.814005-2-ruanjinjie@huawei.com> (raw)
In-Reply-To: <20230803104807.814005-1-ruanjinjie@huawei.com>

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 --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


  reply	other threads:[~2023-08-03 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 10:48 [PATCH -next 0/2] soc: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
2023-08-03 10:48 ` Ruan Jinjie [this message]
2023-08-03 10:48 ` [PATCH -next 2/2] soc: xilinx: " Ruan Jinjie
2023-08-04  6:53   ` Michal Simek

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=20230803104807.814005-2-ruanjinjie@huawei.com \
    --to=ruanjinjie@huawei.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michal.simek@amd.com \
    --cc=qiang.zhao@nxp.com \
    --cc=robh@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).