Skip to content
Commit e5ab4766 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

MIPS: generic/yamon-dt: fix uninitialized variable error

[ Upstream commit 255e51da ]

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:100:7: error: Uninitialized variable: phys_memsize [uninitvar]

Fixes: f41d2430

 ("MIPS: generic/yamon-dt: Support > 256MB of RAM")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 12ec6932
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment