regulator: ab8500: Don't update lp_mode_req flag in set_mode() error paths
authorAxel Lin <axel.lin@ingics.com>
Tue, 9 Apr 2013 12:17:15 +0000 (20:17 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 17 Apr 2013 14:08:27 +0000 (15:08 +0100)
Currently, set invalid mode setting for shared mode regulators may change
sm->lp_mode_req flag. This patch ensures we don't set lp_mode_req flag to wrong
status if set_mode() fails.

This patch includes some clean up, and these changes makes this patch looks like
code refactor. The clean up is mainly to avoid adding ugly code to handle
failure paths.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found