lkml.org 
[lkml]   [2013]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] pinctrl: pinctrl_select_state: set the old_state back on error
Date
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>
---
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


\
 
 \ /
  Last update: 2013-03-28 13:21    [W:1.239 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site