Skip to content

Commit

Permalink
pinctrl: pinctrl_select_state: set the old_state back on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Genoud authored and Linus Walleij committed Apr 3, 2013
1 parent 8009d5f commit 175ca83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ static int pinctrl_select_state_locked(struct pinctrl *p,
pinmux_enable_setting(setting);
}
}

p->state = old_state;
return ret;
}

Expand Down

0 comments on commit 175ca83

Please sign in to comment.