pinctrl: aw9523: fix mutex unlock in error path

We must unlock the mutex *after* the `out` label or we'd trigger a
deadlock in error path.

Fixes: dffe286e24 ("pinctrl: aw9523: use new GPIO line value setter callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202506191952.A03cvn22-lkp@intel.com/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250619173537.64298-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Bartosz Golaszewski
2025-06-24 21:11:02 +02:00
committed by Linus Walleij
parent 4b443bbcd1
commit b4102e3524
+1 -1
View File
@@ -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;
}