aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorMika Westerberg <[email protected]>2014-04-01 10:03:00 +0000
committerLinus Walleij <[email protected]>2014-04-14 08:22:36 +0000
commitb5539fa2d59d697b7b8e28b4d08da844ff60f7cf (patch)
tree7c78548114e5d19d31b6477f98600d54d5b26177 /drivers/net/xen-netback/interface.c
parentgpio / ACPI: Don't crash on NULL chip->dev (diff)
downloadkernel-b5539fa2d59d697b7b8e28b4d08da844ff60f7cf.tar.gz
kernel-b5539fa2d59d697b7b8e28b4d08da844ff60f7cf.zip
gpio / ACPI: Prevent potential wrap of GPIO value on OpRegion read
Dan Carpenter's static code checker reports: The patch 473ed7be0da0: "gpio / ACPI: Add support for ACPI GPIO operation regions" from Mar 14, 2014, leads to the following static checker warning: drivers/gpio/gpiolib-acpi.c:454 acpi_gpio_adr_space_handler() warn: should 'gpiod_get_raw_value(desc) << i' be a 64 bit type? This is due the fact that *value is of type u64 and gpiod_get_raw_value() returns int. Since i can be larger than 31, it is possible that the value returned gets wrapped. Fix this by casting the return of gpiod_get_raw_value() to u64 first before shift. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions