Skip to content
Commit 7d3a5eb7 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Marc Zyngier
Browse files

irqchip/imx-irqsteer: Fix of_property_read_u32() error handling



gcc points out that irqs_num is not initialized when of_property_read_u32()
is an empty stub function:

                 Included from drivers/irqchip/irq-imx-irqsteer.c:7:
drivers/irqchip/irq-imx-irqsteer.c: In function 'imx_irqsteer_probe':
include/uapi/linux/kernel.h:13:49: error: 'irqs_num' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The same can actually happen with CONFIG_OF=y as well, though we don't
get a warning then.

Add error checking here that lets the code deal with missing or
invalid properties as well as avoid the warning.

Fixes: 28528fca ("irqchip/imx-irqsteer: Add multi output interrupts support")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 28528fca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment