linux-stable/arch/mips/generic
Colin Ian King e5ab47660a MIPS: generic/yamon-dt: fix uninitialized variable error
[ Upstream commit 255e51da15 ]

In the case where fw_getenv returns an error when fetching values
for ememsizea and memsize then variable phys_memsize is not assigned
a variable and will be uninitialized on a zero check of phys_memsize.
Fix this by initializing phys_memsize to zero.

Cleans up cppcheck error:
arch/mips/generic/yamon-dt.c💯7: error: Uninitialized variable: phys_memsize [uninitvar]

Fixes: f41d2430bb ("MIPS: generic/yamon-dt: Support > 256MB of RAM")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:40:39 +01:00
..
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile Update MIPS email addresses 2017-11-03 09:02:30 -07:00
Platform Update MIPS email addresses 2017-11-03 09:02:30 -07:00
board-boston.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:48:56 -04:00
board-ni169445.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:48:56 -04:00
board-sead3.c Update MIPS email addresses 2017-11-03 09:02:30 -07:00
init.c MIPS: generic: fix missing of_node_put() 2018-09-19 22:43:43 +02:00
irq.c MIPS: Generic: Support GIC in EIC mode 2018-04-26 11:02:17 +02:00
kexec.c MIPS: Update email address for Marcin Nowakowski 2017-11-02 10:58:43 +00:00
proc.c Update MIPS email addresses 2017-11-03 09:02:30 -07:00
vmlinux.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:48:56 -04:00
yamon-dt.c MIPS: generic/yamon-dt: fix uninitialized variable error 2021-11-26 11:40:39 +01:00