Skip to contentSkip to conversation

ARM: hisilicon: hikey: do not rely on random stack value

PATCH New Heinrich Schuchardt 2 participants 2 messages Jul 30, 2017 – Aug 14, 2017

lore
Share & tools
lore
#0 lore raw

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.

---
 board/hisilicon/hikey/hikey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/hisilicon/hikey/hikey.c +1 -1
index 47bce4daa6..c513d0af10 100644
@@ -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
#1 lore raw

PATCH 1/1 ARM: hisilicon: hikey: do not rely on random stack value

Quoted 8 lines · xypron.glpk at gmx.de

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.

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>