pinctrl: aw9523: fix mutex unlock in error path
Subsystems (2)
PATCH 1/1 pinctrl: aw9523: fix mutex unlock in error path
From: Bartosz Golaszewski <[email protected]>
We must unlock the mutex *after* the out label or we'd trigger a deadlock in error path.
Fixes dffe286e2428 ("pinctrl: aw9523: use new GPIO line value setter callbacks")
Reported-by kernel test robot <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/pinctrl/pinctrl-aw9523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-aw9523.c +1 -1
@@ -652,9 +652,9 @@ static int aw9523_gpio_set_multiple(struct gpio_chip *chip,if (ret) goto out; } -mutex_unlock (&awi->i2c_lock); out: +mutex_unlock (&awi->i2c_lock);return ret; }
Signature · 1 line
2.48.1
Quoted 10 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
We must unlock the mutex *after* the
outlabel or we'd trigger a deadlock in error path.Fixes dffe286e2428 ("pinctrl: aw9523: use new GPIO line value setter callbacks")Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>
Patch applied!
Yours,
Linus Walleij