linux-stable/drivers/platform
Geert Uytterhoeven b81e830c9a platform/mellanox: mlxreg-hotplug: Fix uninitialized variable
With gcc-4.1.2:

    drivers/platform/mellanox/mlxreg-hotplug.c: In function ‘mlxreg_hotplug_health_work_helper’:
    drivers/platform/mellanox/mlxreg-hotplug.c:347: warning: ‘ret’ is used uninitialized in this function

Indeed, if mlxreg_core_item.count is zero, ret is used uninitialized.

While this is unlikely to happen (it is set to ARRAY_SIZE(...) in x86
board files), this is done in another source file, so fix this by
preinitializing ret to zero.

Fixes: c6acad68eb ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2018-02-08 17:43:37 -08:00
..
chrome Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-01-30 17:58:07 -08:00
goldfish the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
mellanox platform/mellanox: mlxreg-hotplug: Fix uninitialized variable 2018-02-08 17:43:37 -08:00
mips MIPS: Loongson-3: Support 4 packages in CPU Hwmon driver 2017-06-29 02:42:22 +02:00
olpc platform/olpc: Make ec explicitly non-modular 2016-08-28 22:31:52 -07:00
x86 platform/x86: samsung-laptop: Re-use DEFINE_SHOW_ATTRIBUTE() macro 2018-02-07 12:50:23 +02:00
Kconfig platform/x86: Move Mellanox platform hotplug driver to platform/mellanox 2018-01-31 10:36:48 -08:00
Makefile platform/x86: Move Mellanox platform hotplug driver to platform/mellanox 2018-01-31 10:36:48 -08:00