diff options
author | Krystian Garbaciak <krystian.garbaciak@diasemi.com> | 2012-06-18 12:04:29 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-19 09:42:56 (GMT) |
commit | 632a5b01db8cd4068a06f8a67720ea4f9b00d9b3 (patch) | |
tree | 6cb211520ebfef0c1ccb8d8fdb16b45bb3762bd4 | |
parent | 6863ca6227598d15c372f1e03449bbb4cfbcca7f (diff) | |
download | linux-fsl-qoriq-632a5b01db8cd4068a06f8a67720ea4f9b00d9b3.tar.xz |
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>
-rw-r--r-- | drivers/base/regmap/regmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 83a0166..d912eb2 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; |