Skip to contentSkip to conversation

MIPS: SGI-IP27: rework HUB interrupts

bug report Dan Carpenter 1 participant 1 message Mar 27, 2019 MIPS

lore
Share & tools
lore
#0 lore raw

Hello Thomas Bogendoerfer,

This is a semi-automatic email about new static checker warnings.

The patch 69a07a41d908: "MIPS: SGI-IP27: rework HUB interrupts" from Feb 19, 2019, leads to the following Smatch complaint:

arch/mips/sgi-ip27/ip27-irq.c:123 shutdown_bridge_irq()
warn: variable dereferenced before check 'hd' (see line 121)

arch/mips/sgi-ip27/ip27-irq.c
117 static void shutdown_bridge_irq(struct irq_data *d) 118 {
119 struct hub_irq_data *hd = irq_data_get_irq_chip_data(d);
120 struct bridge_controller *bc;

   121		int pin = hd->pin;
                          ^^^^^^^

Dereference.

122
123 if (!hd)

                    ^^^

Too late.

124 return;
125

regards,
dan carpenter