Commit cb9f6a40 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

irqchip/riscv-imsic: Don't dereference before NULL pointer check



smatch warns about a dereference before check:
drivers/irqchip/irq-riscv-imsic-platform.c:317 imsic_irqdomain_init() warn: variable dereferenced before check 'imsic' (see line 311)    

Cure it by moving the firmware not assignement after the checks.

Fixes: 59422904 ("irqchip/riscv-imsic: Convert to msi_create_parent_irq_domain() helper")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Closes: https://lore.kernel.org/r/202507311953.NFVZkr0a-lkp@intel.com/                                                                                                                                                                                                                                                       ---
 drivers/irqchip/irq-riscv-imsic-platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
parent 7e161a99
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment