[PATCH 3/3] pinctrl: pinctrl_select_state: set the old_state back on error

From: Richard Genoud
Date: Thu Mar 28 2013 - 07:56:34 EST


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@xxxxxxxxx>
---
This one can be squshed with commit:
50cf7c8ab324de348990bb028ad9ed10872d527a
pinctrl: re-enable old state in case of error in pinctrl_select_state
If needed.

drivers/pinctrl/core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 7c34937..714cf74 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -947,6 +947,8 @@ unapply_new_state:
pinmux_enable_setting(setting);
}
}
+
+ p->state = old_state;
return ret;
}

--
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/