Skip to content

Commit 1fcf171

Browse files
andy-shevbroonie
authored andcommitted
regcache: Remove duplicate check in regcache_hw_init()
The regcache_hw_init() is never called without preliminary check for num_reg_defaults_raw not being 0. Thus, remove duplicate in the function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260210161058.53093-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 6de23f8 commit 1fcf171

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/base/regmap/regcache.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ static int regcache_hw_init(struct regmap *map)
5050
unsigned int reg, val;
5151
void *tmp_buf;
5252

53-
if (!map->num_reg_defaults_raw)
54-
return -EINVAL;
55-
5653
/* calculate the size of reg_defaults */
5754
for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++)
5855
if (regmap_readable(map, i * map->reg_stride) &&

0 commit comments

Comments
 (0)