From: Oliver Dillinger <oliver.dillinger@ttcontrol.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] env_sf - Do not free flash environment on successful read
Date: Fri, 22 Oct 2010 10:20:02 +0000 (UTC) [thread overview]
Message-ID: <loom.20101022T120849-268@post.gmane.org> (raw)
In env_relocate_spec(), env_flash is freed and set to NULL
if CONFIG_ENV_OFFSET_REDUND is undefined. This leads to an
"Environment SPI flash not initialized" error when
performing a saveenv.
br,
Oliver
diff --git a/common/env_sf.c b/common/env_sf.c
index fb0c39b..fc5f9f3 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -384,7 +384,10 @@ void env_relocate_spec(void)
ret = env_import(buf, 1);
if (ret)
+ {
gd->env_valid = 1;
+ return;
+ }
out:
spi_flash_free(env_flash);
env_flash = NULL;
next reply other threads:[~2010-10-22 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 10:20 Oliver Dillinger [this message]
2010-10-22 10:56 ` [U-Boot] [PATCH] env_sf - Do not free flash environment on successful read Wolfgang Denk
2010-10-22 11:48 ` Stefano Babic
2010-10-22 12:07 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20101022T120849-268@post.gmane.org \
--to=oliver.dillinger@ttcontrol.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.