[U-Boot] env: sata: Fix saveenv issue
diff mbox series

Message ID 1546852938-24209-1-git-send-email-ye.li@nxp.com
State Accepted
Commit 17be909a1b67e919de6fc20b23f35c66a4cdf4c6
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot] env: sata: Fix saveenv issue
Related show

Commit Message

Ye Li Jan. 7, 2019, 9:22 a.m. UTC
Wrong env buffer was passed into sata write function, cause the saveenv
not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
---
 env/sata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Jan. 10, 2019, 2:32 a.m. UTC | #1
On Mon, Jan 07, 2019 at 09:22:35AM +0000, Ye Li wrote:

> Wrong env buffer was passed into sata write function, cause the saveenv
> not work.
> 
> Signed-off-by: Ye Li <ye.li@nxp.com>

Applied to u-boot/master, thanks!

Patch
diff mbox series

diff --git a/env/sata.c b/env/sata.c
index 59aedf4..a2ff5c6 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;
 	}