Commit 673ba5a0 authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Walleij

pinctrl: single: Fix missing unlock on error path

Add the missing unlock before return from function
in the error handling case.

Fixes: 0f5972033509 ("pinctrl: single: Fix group and function selector use")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 93639058
......@@ -1071,8 +1071,8 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
*num_maps = 1;
free_function:
pinmux_generic_remove_function(pcs->pctl, fsel);
mutex_unlock(&pcs->mutex);
free_pins:
mutex_unlock(&pcs->mutex);
devm_kfree(pcs->dev, pins);
free_vals:
......@@ -1211,8 +1211,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
*num_maps = 1;
free_function:
pinmux_generic_remove_function(pcs->pctl, fsel);
mutex_unlock(&pcs->mutex);
free_pins:
mutex_unlock(&pcs->mutex);
devm_kfree(pcs->dev, pins);
free_vals:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment