Skip to content
Commit 2526dffc authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpio: remove GPIO device from the list unconditionally in error path



Since commit 48e1b4d3 ("gpiolib: remove the GPIO device from the list
when it's unregistered") we remove the GPIO device entry from the global
list (used to order devices by their GPIO ranges) when unregistering the
chip, not when releasing the device. It will not happen when the last
reference is put anymore. This means, we need to remove it in error path
in gpiochip_add_data_with_key() unconditionally, without checking if the
device's .release() callback is set.

Fixes: 48e1b4d3 ("gpiolib: remove the GPIO device from the list when it's unregistered")
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 54be6c6c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment