linux/arch/mips/generic
Colin Ian King 34284b3a2f 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 10:39:15 +01:00
..
board-boston.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:47:16 -04:00
board-ingenic.c MIPS: Ingenic: Add system type for new Ingenic SoCs. 2020-09-27 10:57:27 +02:00
board-ni169445.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:47:16 -04:00
board-ocelot.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
board-ocelot.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:47:16 -04:00
board-ranchu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
board-sead3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
board-xilfpga.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:47:16 -04:00
init.c MIPS: generic: Support booting with built-in or appended DTB 2020-09-18 16:32:19 +02:00
irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig MIPS: generic: Add support for Ingenic SoCs 2020-09-18 16:33:59 +02:00
Makefile MIPS: generic: Add support for Ingenic SoCs 2020-09-18 16:33:59 +02:00
Platform MIPS: jz4740: Rename jz4740 folders to ingenic 2020-09-18 16:35:05 +02:00
proc.c MIPS: generic: Allow boards to set system type 2020-09-18 16:28:56 +02:00
vmlinux.its.S MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:47:16 -04:00
yamon-dt.c MIPS: generic/yamon-dt: fix uninitialized variable error 2021-11-26 10:39:15 +01:00