提交 632a5b01 编写于 作者: K Krystian Garbaciak 提交者: Mark Brown

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: NKrystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 6863ca62
...@@ -693,10 +693,11 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, ...@@ -693,10 +693,11 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg,
range->selector_mask, range->selector_mask,
win_page << range->selector_shift, win_page << range->selector_shift,
&page_chg); &page_chg);
if (ret < 0)
return ret;
map->work_buf = orig_work_buf; map->work_buf = orig_work_buf;
if (ret < 0)
return ret;
} }
*reg = range->window_start + win_offset; *reg = range->window_start + win_offset;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册