Skip to content

Commit 393c554

Browse files
neheblinusw
authored andcommitted
pinctrl: aw9523: add missing mutex_destroy
Otherwise the mutex remains after a failed kzalloc. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/20241001212724.309320-1-rosenp@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent b0f0e3f commit 393c554

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/pinctrl/pinctrl-aw9523.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,10 @@ static int aw9523_probe(struct i2c_client *client)
987987
lockdep_set_subclass(&awi->i2c_lock, i2c_adapter_depth(client->adapter));
988988

989989
pdesc = devm_kzalloc(dev, sizeof(*pdesc), GFP_KERNEL);
990-
if (!pdesc)
991-
return -ENOMEM;
990+
if (!pdesc) {
991+
ret = -ENOMEM;
992+
goto err_disable_vregs;
993+
}
992994

993995
ret = aw9523_hw_init(awi);
994996
if (ret)

0 commit comments

Comments
 (0)