summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2022-02-11 09:39:04 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-02 11:42:57 +0100
commit4185b788d3adc9e66b5b9c959b91ae17b8488fc3 (patch)
tree602dc67804618e631b493b8b5dcd01b949bbb05a /mm
parentbb2e0a77235a1b083a255c462cbacfb40def9a58 (diff)
gpio: tegra186: Fix chip_data type confusion
commit d1e972ace42390de739cde87d96043dcbe502286 upstream. 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 <maz@kernel.org> Cc: Thierry Reding <treding@nvidia.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20220211093904.1112679-1-maz@kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions