summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@gmail.com>2013-03-28 12:55:48 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-04-03 14:27:31 +0200
commit175ca83c0b6ab3c2af2d9e1ffff4d274910bbc10 (patch)
tree07ad5520a6fc6104d29ebe16eca4d06cdd5fd324 /drivers/pinctrl/core.c
parentpinctrl: remove superfluous optimization in pinctrl_select_state_locked (diff)
downloadlinux-175ca83c0b6ab3c2af2d9e1ffff4d274910bbc10.tar.xz
linux-175ca83c0b6ab3c2af2d9e1ffff4d274910bbc10.zip
pinctrl: pinctrl_select_state: set the old_state back on error
In unapply_new_state, the old state is re-applied, but p->state is not set back as it should. 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>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r--drivers/pinctrl/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index f04f7d3d9a94..96cee791aa82 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -991,6 +991,8 @@ unapply_new_state:
pinmux_enable_setting(setting);
}
}
+
+ p->state = old_state;
return ret;
}