From 175ca83c0b6ab3c2af2d9e1ffff4d274910bbc10 Mon Sep 17 00:00:00 2001 From: Richard Genoud Date: Thu, 28 Mar 2013 12:55:48 +0100 Subject: [PATCH] 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 Reviewed-by: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/core.c | 2 ++ 1 file changed, 2 insertions(+) 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; }