All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: Fix work_buf switching for page update during virtual range access.
@ 2012-06-18 12:04 Krystian Garbaciak
  2012-06-19  9:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Krystian Garbaciak @ 2012-06-18 12:04 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, Anthony Olech

After page update, orginal work_buf has to be restored regardless of
the result.

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-19  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 12:04 [PATCH] regmap: Fix work_buf switching for page update during virtual range access Krystian Garbaciak
2012-06-19  9:52 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.