pinctrl: select_state: don't call pinctrl_free_setting on error
authorRichard Genoud <richard.genoud@gmail.com>
Fri, 29 Mar 2013 09:03:26 +0000 (10:03 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 3 Apr 2013 12:36:43 +0000 (14:36 +0200)
commitaf6061777131639d7d2687ce542b6052a6510c25
tree20ec7d1b588956f6fd7aa8706339af91351941b2
parent28d0c14b43a04deac8afe27ab700cc7638a7f4ba
pinctrl: select_state: don't call pinctrl_free_setting on error

As Stephen Warren pointed out, pinctrl_free_setting() was called instead
of pinmux_disable_setting() on error.
In this error code, we want to call pinmux_disable_setting() where
pinmux_enable_setting() was called.
And when pinconf_apply_setting() was called, we can't do much to undo
the pin muxing (the closest thing I can think about for "unmuxing" a pin
is muxing it as GPIO input).

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c