aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2022-02-11 09:39:04 +0000
committerLinus Walleij <[email protected]>2022-02-19 01:51:24 +0100
commitd1e972ace42390de739cde87d96043dcbe502286 (patch)
tree6bba3806a20795b111bd89ee4481a75301af0ece /net/lapb/lapb_iface.c
parent64fd52a4d3ce63a327948cefc8e4e5c7ef35e813 (diff)
gpio: tegra186: Fix chip_data type confusion
The tegra186 GPIO driver makes the assumption that the pointer returned by irq_data_get_irq_chip_data() is a pointer to a tegra_gpio structure. Unfortunately, it is actually a pointer to the inner gpio_chip structure, as mandated by the gpiolib infrastructure. Nice try. The saving grace is that the gpio_chip is the first member of tegra_gpio, so the bug has gone undetected since... forever. Fix it by performing a container_of() on the pointer. This results in no additional code, and makes it possible to understand how the whole thing works. Fixes: 5b2b135a87fc ("gpio: Add Tegra186 support") Signed-off-by: Marc Zyngier <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions