aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2016-11-08 14:40:06 +0100
committerLinus Walleij <[email protected]>2016-11-09 09:43:55 +0100
commitc82064f26f44ea13f097dfb58d5ffd4359dcabbb (patch)
tree731092773f6c54fbb6d4478e4cf670089d9e3b02 /scripts/gdb/linux/utils.py
parente0275034ad94c413090bab4bf65ccb70906725ed (diff)
ACPI / gpio: avoid warning for gpio hogging code
The newly added acpi_gpiochip_scan_gpios function produces a few harmless warnings: drivers/gpio/gpiolib-acpi.c: In function ‘acpi_gpiochip_add’: drivers/gpio/gpiolib-acpi.c:925:7: error: ‘dflags’ may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/gpio/gpiolib-acpi.c:925:9: error: ‘lflags’ may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem is that he compiler cannot know that a negative return value from fwnode_property_read_u32_array() or acpi_gpiochip_pin_to_gpio_offset() implies that the IS_ERR(gpio_desc) is true, as the value could in theory be below -MAX_ERRNO. The function already initializes its output values to zero, and moving that intialization a little higher up ensures that we can never have uninitialized data in the caller. Fixes: c80f1ba75df2 ("ACPI / gpio: Add hogging support") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions