Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpiolib: Free the last requested descriptor
The current code only frees N-1 gpios if an error occurs during gpiod_set_transitory, gpiod_direction_output or gpiod_direction_input. Leading to gpios that cannot be used by userspace nor other drivers. Cc: Timur Tabi <[email protected]> Cc: [email protected] Fixes: ab3dbcf ("gpioib: do not free unrequested descriptors) Reported-by: Jan Lorenzen <[email protected]> Reported-by: Jim Paris <[email protected]> Signed-off-by: Ricardo Ribalda Delgado <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
- Loading branch information