]> git.ipfire.org Git - thirdparty/linux.git/commit
gpiolib: remove redundant callback check
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 9 Jan 2026 10:55:56 +0000 (11:55 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 12 Jan 2026 08:35:04 +0000 (09:35 +0100)
commit471e998c0e31206ff0eac7202b2659698cf9b46e
treea276816c8464e772bee86d106b1dbab5e75b4a56
parentc18790018799155e58d5a11c6697f9c398bf8b60
gpiolib: remove redundant callback check

The presence of the .get_direction() callback is already checked in
gpiochip_get_direction(). Remove the duplicated check which also returns
the wrong error code to user-space.

Fixes: e623c4303ed1 ("gpiolib: sanitize the return value of gpio_chip::get_direction()")
Reported-by: Michael Walle <mwalle@kernel.org>
Closes: https://lore.kernel.org/all/DFJAFK3DTBOZ.3G2P3A5IH34GF@kernel.org/
Link: https://lore.kernel.org/r/20260109105557.20024-1-bartosz.golaszewski@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib.c