summaryrefslogtreecommitdiffstats
path: root/fs/no-block.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-01-26 11:45:35 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-27 10:45:10 +0800
commita3471469bcba61f8f18ca4c267b0cdd90a61e035 (patch)
treecc2cd6329ab62136e902c1fa5f8116337da0036c /fs/no-block.c
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
downloadtalos-op-linux-a3471469bcba61f8f18ca4c267b0cdd90a61e035.tar.gz
talos-op-linux-a3471469bcba61f8f18ca4c267b0cdd90a61e035.zip
regmap: regmap: avoid spurious warning in regmap_read_debugfs
Gcc warns about the case where regmap_read_debugfs tries to walk an empty map->debugfs_off_cache list, which would results in uninitialized variable getting returned, if we hadn't checked the same condition just before that. After an originally suggested inferior patch from Arnd Bergmann, this is the solution that Russell King came up with, sidestepping the problem by merging the error case for an empty list with the normal path. Without this patch, building mxs_defconfig results in: drivers/base/regmap/regmap-debugfs.c: In function 'regmap_read_debugfs': drivers/base/regmap/regmap-debugfs.c:147:9: : warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] Reported-by: Vincent Stehle <v-stehle@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'fs/no-block.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud