[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ms8hgydv.ffs@tglx>
Date: Sun, 03 Aug 2025 00:19:24 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Kuan-Wei Chiu <visitorckw@...il.com>, anup@...infault.org,
paul.walmsley@...ive.com, palmer@...belt.com, aou@...s.berkeley.edu,
alex@...ti.fr, maz@...nel.org
Cc: jserv@...s.ncku.edu.tw, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, Kuan-Wei Chiu <visitorckw@...il.com>, kernel
test robot <lkp@...el.com>, Dan Carpenter <error27@...il.com>
Subject: Re: [PATCH] irqchip/riscv-imsic: Fix 'imsic' dereferenced before
NULL check
On Sat, Aug 02 2025 at 01:24, Kuan-Wei Chiu wrote:
> Smatch reported a warning in imsic_irqdomain_init():
>
> drivers/irqchip/irq-riscv-imsic-platform.c:317 imsic_irqdomain_init() warn: variable dereferenced before check 'imsic' (see line 311)
>
> The variable imsic was dereferenced before being checked for NULL.
> To fix this, move the initialization of struct irq_domain_info after
> the NULL check to avoid accessing imsic prematurely.
It's fixed already w/o moving the struct into the middle of the code:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=irq/urgent
But thanks a lot for caring!
Thanks,
tglx
Powered by blists - more mailing lists