Преглед изворни кода

regmap: debugfs: Fix check for block start in cached seeks

Check for the block we were asked to start from, not the position we're
in.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown пре 12 година
родитељ
комит
5a1d6d172b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      drivers/base/regmap/regmap-debugfs.c

+ 1 - 1
drivers/base/regmap/regmap-debugfs.c

@@ -103,7 +103,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
 
 
 	/* Find the relevant block */
 	/* Find the relevant block */
 	list_for_each_entry(c, &map->debugfs_off_cache, list) {
 	list_for_each_entry(c, &map->debugfs_off_cache, list) {
-		if (*pos >= c->min && *pos <= c->max) {
+		if (from >= c->min && from <= c->max) {
 			*pos = c->min;
 			*pos = c->min;
 			return c->base_reg;
 			return c->base_reg;
 		}
 		}