All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jackie Liu <liu.yun@linux.dev>
To: krzysztof.kozlowski@canonical.com
Cc: linux-samsung-soc@vger.kernel.org, liuyun01@kylinos.cn
Subject: [PATCH] ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc()
Date: Tue, 31 Aug 2021 17:57:28 +0800	[thread overview]
Message-ID: <20210831095728.2447598-1-liu.yun@linux.dev> (raw)

From: Jackie Liu <liuyun01@kylinos.cn>

The s3c24xx_init_intc() returns an error pointer upon failure, not NULL.
let's add an error pointer check in s3c24xx_handle_irq.

Fixes: 1f629b7a3ced ("ARM: S3C24XX: transform irq handling into a declarative form")
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 arch/arm/mach-s3c/irq-s3c24xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
index 0c631c14a817..d58bf0f9bf9a 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-s3c24xx.c
@@ -362,11 +362,11 @@ static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
 static asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
 {
 	do {
-		if (likely(s3c_intc[0]))
+		if (likely(!IS_ERR_OR_NULL(s3c_intc[0])))
 			if (s3c24xx_handle_intc(s3c_intc[0], regs, 0))
 				continue;
 
-		if (s3c_intc[2])
+		if (!IS_ERR_OR_NULL(s3c_intc[2]))
 			if (s3c24xx_handle_intc(s3c_intc[2], regs, 64))
 				continue;
 
-- 
2.25.1


             reply	other threads:[~2021-08-31  9:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  9:57 Jackie Liu [this message]
2021-09-01 12:09 ` [PATCH] ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc() Krzysztof Kozlowski
2021-09-01 12:28   ` Jackie Liu
2021-09-01 12:28     ` Jackie Liu
2021-09-01 12:31     ` Krzysztof Kozlowski
2021-09-01 12:31       ` Krzysztof Kozlowski

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=20210831095728.2447598-1-liu.yun@linux.dev \
    --to=liu.yun@linux.dev \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=liuyun01@kylinos.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.