ARM: hisilicon: hikey: do not rely on random stack value
PATCH 1/1 ARM: hisilicon: hikey: do not rely on random stack value
If CONFIG_MMC_DW is not defined the return value of init_dwmmc should not rely on a random stack value.
Instead indicate that no error occured.
The problem was indicated by cppcheck.
Signed-off-by Heinrich Schuchardt <[email protected]>
--- board/hisilicon/hikey/hikey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/hisilicon/hikey/hikey.c +1 -1
@@ -345,7 +345,7 @@ int board_init(void)static int init_dwmmc (void ) { -int ret; +int ret =0 ;#ifdef CONFIG_MMC_DW
Signature · 1 line
2.13.2
PATCH 1/1 ARM: hisilicon: hikey: do not rely on random stack value
Quoted 8 lines · xypron.glpk at gmx.de
If
CONFIG_MMC_DWis not defined the return value ofinit_dwmmcshould not rely on a random stack value.Instead indicate that no error occured.
The problem was indicated by cppcheck.
Signed-off-by Heinrich Schuchardt <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170813/4fa1ab05/attachment.sig>