summaryrefslogtreecommitdiffstats
path: root/arch/mips/fw/lib/cmdline.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/fw/lib/cmdline.c')
-rw-r--r--arch/mips/fw/lib/cmdline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/fw/lib/cmdline.c b/arch/mips/fw/lib/cmdline.c
index 6ecda64ad..ed88abc40 100644
--- a/arch/mips/fw/lib/cmdline.c
+++ b/arch/mips/fw/lib/cmdline.c
@@ -51,7 +51,7 @@ char *fw_getenv(char *envname)
{
char *result = NULL;
- if (_fw_envp != NULL) {
+ if (_fw_envp != NULL && fw_envp(0) != NULL) {
/*
* Return a pointer to the given environment variable.
* YAMON uses "name", "value" pairs, while U-Boot uses