diff options
author | Colin Ian King <colin.i.king@googlemail.com> | 2021-11-10 23:28:24 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-26 11:36:22 +0100 |
commit | 96088a6e3df98ad4ba28a1fcb5ac93ff04c0cca0 (patch) | |
tree | 1b6adfd1cd720502377795c5cd58d91fe442824c /arch/ia64/uv | |
parent | 5472e54214314e3860da059af0feabfe852a1931 (diff) |
MIPS: generic/yamon-dt: fix uninitialized variable error
[ Upstream commit 255e51da15baed47531beefd02f222e4dc01f1c1 ]
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: f41d2430bbd6 ("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>
Diffstat (limited to 'arch/ia64/uv')
0 files changed, 0 insertions, 0 deletions