lib: sbi_irqchip: error handling in sbi_irqchip_raw_handler_default()

sbi_irqchip_find_handler() may return NULL.
Check the return value before dereferencing.

Addresses-Coverity-ID: 1677408 Dereference null return value
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260820134431.167336-1-heinrich.schuchardt@canonical.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Heinrich Schuchardt
2026-09-04 13:55:01 +05:30
committed by Anup Patel
parent 7384968e02
commit bf459f85bf
+3
View File
@@ -185,6 +185,9 @@ int sbi_irqchip_raw_handler_default(struct sbi_irqchip_device *chip, u32 hwirq)
return SBI_EINVAL;
h = sbi_irqchip_find_handler(chip, hwirq);
if (!h)
return SBI_EINVAL;
if (h->callback)
rc = h->callback(hwirq, h->priv);