After page update, orginal work_buf has to be restored regardless of
the result.
Signed-off-by: Krystian Garbaciak <[email protected]>
---
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;
--
1.7.0.4
On Mon, Jun 18, 2012 at 01:04:29PM +0100, Krystian Garbaciak wrote:
> After page update, orginal work_buf has to be restored regardless of
> the result.
Applied, thanks.