Skip to content

Commit e8d6539

Browse files
committed
regmap: debugfs: Make sure we store the last entry in the offset cache
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 5bd9f4b commit e8d6539

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/base/regmap/regmap-debugfs.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
116116
}
117117
}
118118

119+
/* Close the last entry off if we didn't scan beyond it */
120+
if (c) {
121+
c->max = p - 1;
122+
list_add_tail(&c->list,
123+
&map->debugfs_off_cache);
124+
} else {
125+
return base;
126+
}
127+
119128
/*
120129
* This should never happen; we return above if we fail to
121130
* allocate and we should never be in this code if there are

0 commit comments

Comments
 (0)