diff options
author | Krystian Garbaciak <krystian.garbaciak@diasemi.com> | 2012-06-18 08:04:29 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-19 05:42:56 -0400 |
commit | 632a5b01db8cd4068a06f8a67720ea4f9b00d9b3 (patch) | |
tree | 6cb211520ebfef0c1ccb8d8fdb16b45bb3762bd4 /drivers/base | |
parent | 6863ca6227598d15c372f1e03449bbb4cfbcca7f (diff) |
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.c | 5 |
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, | |||
693 | range->selector_mask, | 693 | range->selector_mask, |
694 | win_page << range->selector_shift, | 694 | win_page << range->selector_shift, |
695 | &page_chg); | 695 | &page_chg); |
696 | if (ret < 0) | ||
697 | return ret; | ||
698 | 696 | ||
699 | map->work_buf = orig_work_buf; | 697 | map->work_buf = orig_work_buf; |
698 | |||
699 | if (ret < 0) | ||
700 | return ret; | ||
700 | } | 701 | } |
701 | 702 | ||
702 | *reg = range->window_start + win_offset; | 703 | *reg = range->window_start + win_offset; |