diff options
| author | Bartosz Golaszewski <[email protected]> | 2025-06-18 13:02:06 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2025-06-19 07:13:44 +0000 |
| commit | 1fd7d210952938e8ef6d87287e056e25a2fc0547 (patch) | |
| tree | cc3a151bcb7b365df86b8f01aa1f52f7b6f3d61a /drivers/gpio | |
| parent | Merge tag 'gpio-mmio-bgpiof-no-input-flag-for-v6.17' into gpio/for-next (diff) | |
| download | kernel-1fd7d210952938e8ef6d87287e056e25a2fc0547.tar.gz kernel-1fd7d210952938e8ef6d87287e056e25a2fc0547.zip | |
gpio: npcm-sgpio: don't use legacy GPIO chip setters
We've converted this driver to using the new GPIO line value setters but
missed the instance 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. Fix it.
Fixes: 0e1a8930c941 ("gpio: npcm-sgpio: use new GPIO line value setter callbacks")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio')
| -rw-r--r-- | drivers/gpio/gpio-npcm-sgpio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-npcm-sgpio.c b/drivers/gpio/gpio-npcm-sgpio.c index b3953d1ae8af..25b203a89e38 100644 --- a/drivers/gpio/gpio-npcm-sgpio.c +++ b/drivers/gpio/gpio-npcm-sgpio.c @@ -211,9 +211,7 @@ static int npcm_sgpio_dir_in(struct gpio_chip *gc, unsigned int offset) static int npcm_sgpio_dir_out(struct gpio_chip *gc, unsigned int offset, int val) { - gc->set(gc, offset, val); - - return 0; + return gc->set_rv(gc, offset, val); } static int npcm_sgpio_get_direction(struct gpio_chip *gc, unsigned int offset) |
