linux-stable/drivers/base/regmap
Russell King a3471469bc 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>
2013-01-27 10:45:10 +08:00
..
internal.h Merge remote-tracking branch 'regmap/topic/table' into regmap-next 2012-12-11 12:39:32 +09:00
Kconfig regmap: select REGMAP if REGMAP_MMIO and REGMAP_IRQ enabled 2012-10-17 22:09:35 +09:00
Makefile regmap: add MMIO bus support 2012-04-06 10:47:35 +01:00
regcache-lzo.c regmap: implement register striding 2012-04-10 11:01:18 +01:00
regcache-rbtree.c regmap: implement register striding 2012-04-10 11:01:18 +01:00
regcache.c regmap: implement register striding 2012-04-10 11:01:18 +01:00
regmap-debugfs.c regmap: regmap: avoid spurious warning in regmap_read_debugfs 2013-01-27 10:45:10 +08:00
regmap-i2c.c i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
regmap-irq.c regmap: irq: Allow users to retrieve the irq_domain 2012-10-15 09:49:23 +09:00
regmap-mmio.c regmap: Fix incorrect arguments to kzalloc() call 2012-07-18 22:13:53 +01:00
regmap-spi.c regmap: introduce explicit bus_context for bus callbacks 2012-04-06 10:47:34 +01:00
regmap.c regmap: fix small typo in regmap_bulk_write comment 2013-01-22 16:24:12 +08:00