]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: mmio: don't use legacy GPIO chip setters
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 18 Jun 2025 13:02:07 +0000 (15:02 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 19 Jun 2025 07:13:44 +0000 (09:13 +0200)
commitcbb887a76b788d8e9646fdd785f43745a3a662bb
treebd3bbd05ab9f66fb027e0604ada83d07425e83da
parent1fd7d210952938e8ef6d87287e056e25a2fc0547
gpio: mmio: don't use legacy GPIO chip setters

We've converted this driver to using the new GPIO line value setters but
missed the instances where the legacy callback is accessed directly using
the function pointer. This will lead to a NULL-pointer dereference as
this pointer is no longer populated. The issue needs fixing locally as
well as in the already converted previously users of gpio-mmio.

Fixes: b908d35d0003 ("gpio: mmio: use new GPIO line value setter callbacks")
Reported-by: Klara Modin <klarasmodin@gmail.com>
Closes: https://lore.kernel.org/all/2rw2sncevdiyirpdovotztlg77apcq2btzytuv5jnm55aqhlne@swtts3hl53tw/
Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250618-gpio-mmio-fix-setter-v1-2-2578ffb77019@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-74xx-mmio.c
drivers/gpio/gpio-en7523.c
drivers/gpio/gpio-mmio.c