diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-05-18 09:40:50 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-05-18 09:40:50 +0200 |
commit | e75dfba311f478f1c2bf928284e1949c20594336 (patch) | |
tree | 058eebede54716f81be6642f1fc26b6d9844fe6c /drivers/gpio/gpio-exar.c | |
parent | b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce (diff) | |
parent | 9fefca775c8ddbbbcd97f2860218188b8641819d (diff) | |
download | linux-stable-e75dfba311f478f1c2bf928284e1949c20594336.tar.gz linux-stable-e75dfba311f478f1c2bf928284e1949c20594336.tar.bz2 linux-stable-e75dfba311f478f1c2bf928284e1949c20594336.zip |
Merge tag 'gpio-fixes-for-v5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
gpio fixes for v5.7-rc6
- fix probing for chips without PWM in gpio-mvebu
- fix ida_simple_get() error path in gpio-exar
- fix user-space notifications for line state changes
Diffstat (limited to 'drivers/gpio/gpio-exar.c')
-rw-r--r-- | drivers/gpio/gpio-exar.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c index da1ef0b1c291..b1accfba017d 100644 --- a/drivers/gpio/gpio-exar.c +++ b/drivers/gpio/gpio-exar.c @@ -148,8 +148,10 @@ static int gpio_exar_probe(struct platform_device *pdev) mutex_init(&exar_gpio->lock); index = ida_simple_get(&ida_index, 0, 0, GFP_KERNEL); - if (index < 0) - goto err_destroy; + if (index < 0) { + ret = index; + goto err_mutex_destroy; + } sprintf(exar_gpio->name, "exar_gpio%d", index); exar_gpio->gpio_chip.label = exar_gpio->name; @@ -176,6 +178,7 @@ static int gpio_exar_probe(struct platform_device *pdev) err_destroy: ida_simple_remove(&ida_index, index); +err_mutex_destroy: mutex_destroy(&exar_gpio->lock); return ret; } |