[U-Boot] [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 xypron.glpk@gmx.de --- board/hisilicon/hikey/hikey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index 47bce4daa6..c513d0af10 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -345,7 +345,7 @@ int board_init(void)
static int init_dwmmc(void) { - int ret; + int ret = 0;
#ifdef CONFIG_MMC_DW

On Sun, Jul 30, 2017 at 09:30:55PM +0200, xypron.glpk@gmx.de wrote:
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 xypron.glpk@gmx.de
Applied to u-boot/master, thanks!
participants (2)
-
Heinrich Schuchardt
-
Tom Rini