mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
gpio: imx-scu: destroy the mutex in detach path
Use devm_mutex_init() in order to clean up after the mutex debug data in detach and error path. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-3-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
dd6d13abb4
commit
68ef71400d
|
|
@ -88,7 +88,10 @@ static int imx_scu_gpio_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
priv->dev = dev;
|
||||
mutex_init(&priv->lock);
|
||||
|
||||
ret = devm_mutex_init(&pdev->dev, &priv->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
gc = &priv->chip;
|
||||
gc->base = -1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user