summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorKrystian Garbaciak <krystian.garbaciak@diasemi.com>2012-06-18 13:04:29 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-19 10:42:56 +0100
commit632a5b01db8cd4068a06f8a67720ea4f9b00d9b3 (patch)
tree6cb211520ebfef0c1ccb8d8fdb16b45bb3762bd4 /drivers/base
parent6863ca6227598d15c372f1e03449bbb4cfbcca7f (diff)
downloadlinux-632a5b01db8cd4068a06f8a67720ea4f9b00d9b3.tar.gz
linux-632a5b01db8cd4068a06f8a67720ea4f9b00d9b3.tar.bz2
linux-632a5b01db8cd4068a06f8a67720ea4f9b00d9b3.zip
regmap: Fix work_buf switching for page update during virtual range access.
After page update, orginal work_buf has to be restored regardless of the result. Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 83a0166420a4..d912eb2d19ce 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -693,10 +693,11 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg,
range->selector_mask,
win_page << range->selector_shift,
&page_chg);
- if (ret < 0)
- return ret;
map->work_buf = orig_work_buf;
+
+ if (ret < 0)
+ return ret;
}
*reg = range->window_start + win_offset;