Patchwork [U-Boot,v2,3/5] tools/env: Don't call env_init() in fw_getenv()

login
register
mail settings
Submitter Joe Hershberger
Date Oct. 3, 2012, 7:38 p.m.
Message ID <1349293130-5715-4-git-send-email-joe.hershberger@ni.com>
Download mbox | patch
Permalink /patch/188911/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Joe Hershberger - Oct. 3, 2012, 7:38 p.m.
We will only call fw_getenv when the env has already been initialized.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
---

 tools/env/fw_env.c | 3 ---
 1 file changed, 3 deletions(-)

Patch

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index af879f1..f883804 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -258,9 +258,6 @@  char *fw_getenv (char *name)
 {
 	char *env, *nxt;
 
-	if (fw_env_open())
-		return NULL;
-
 	for (env = environment.data; *env; env = nxt + 1) {
 		char *val;