From: Richard Genoud Date: Thu, 28 Mar 2013 11:55:48 +0000 (+0100) Subject: pinctrl: pinctrl_select_state: set the old_state back on error X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=175ca83c0b6ab3c2af2d9e1ffff4d274910bbc10;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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; }