openwrt/target/linux/bcm63xx/patches-5.15/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch
Álvaro Fernández Rojas 2317a7426e bcm63xx: add linux v5.15 support
Build system: x86_64
Build-tested: generic, smp
Run-tested: generic/AR-5387un, smp/VR-3032u

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-20 15:53:16 +02:00

21 lines
705 B
Diff

--- a/drivers/irqchip/irq-bcm6345-periph.c
+++ b/drivers/irqchip/irq-bcm6345-periph.c
@@ -52,7 +52,7 @@ static void bcm6345_periph_irq_handle(st
{
struct intc_data *data = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
- struct intc_block *block;
+ struct intc_block *block = NULL;
unsigned int irq = irq_desc_get_irq(desc);
unsigned int idx;
@@ -62,7 +62,7 @@ static void bcm6345_periph_irq_handle(st
if (irq == data->block[idx].parent_irq)
block = &data->block[idx];
- for (idx = 0; idx < data->num_words; idx++) {
+ for (idx = 0; block && idx < data->num_words; idx++) {
int base = idx * IRQS_PER_WORD;
unsigned long pending;
int hw_irq;