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: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Wei Yongjun 2018-07-11 12:33:31 +00:00 committed by Linus Walleij
parent 93639058b2
commit 673ba5a05c
1 changed files with 2 additions and 2 deletions

View File

@ -1071,8 +1071,8 @@ free_pingroups:
*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 @@ free_pingroups:
*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: