]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: ljca: use devm_mutex_init() to simplify the error path and remove()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 8 Oct 2024 16:24:16 +0000 (18:24 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 14 Oct 2024 08:30:36 +0000 (10:30 +0200)
commit476f18c0895df7b281eb84b3e687e6101c844338
tree3033aaed6aba1eb30613c254495deca231ff338b
parenta937ee6d7eba055226fba300e17ade6f65de6d93
gpio: ljca: use devm_mutex_init() to simplify the error path and remove()

Destroying the mutexes is done at the end of remove() so switching to
devres does not constitute a functional change. Use devm_mutex_init()
and remove repetitions of mutex_destroy().

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241008162416.85111-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-ljca.c