From: Ye Li <ye.li@nxp.com>
Date: Mon, 7 Jan 2019 09:22:35 +0000 (+0000)
Subject: env: sata: Fix saveenv issue
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=17be909a1b67e919de6fc20b23f35c66a4cdf4c6;p=project%2Fbcm63xx%2Fu-boot.git

env: sata: Fix saveenv issue

Wrong env buffer was passed into sata write function, cause the saveenv
not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
---

diff --git a/env/sata.c b/env/sata.c
index 59aedf4d76..a2ff5c66f7 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -65,7 +65,7 @@ static int env_sata_save(void)
 		return 1;
 
 	printf("Writing to SATA(%d)...", env_sata);
-	if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, &env_new)) {
+	if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, (u_char *)env_new)) {
 		puts("failed\n");
 		return 1;
 	}