Skip to content

Commit

Permalink
regmap: debugfs: Fix attempts to read nonexistant register blocks
Browse files Browse the repository at this point in the history
Return the start of the last block we tried to read rather than a position,
and also make sure we update the byte position while we're at it.  Without
this reads that go into nonexistant areas get confused.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 8, 2013
1 parent d1c3ed6 commit 120f805
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
return c->base_reg;
}

ret = c->max;
*pos = c->min;
ret = c->base_reg;
}

return ret;
Expand Down

0 comments on commit 120f805

Please sign in to comment.