summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Bedel <albeu@free.fr>2014-11-08 14:39:38 +0300
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 09:45:25 +0300
commit4a792e56cfdbe000d01c01ce356d13f39f5494e7 (patch)
treeb2e5afeabe6b945f01d079a4595dacf0354e1df7
parente2afb7de6e7dad21f9d709f80f23bbd3c5bdad11 (diff)
downloadlinux-4a792e56cfdbe000d01c01ce356d13f39f5494e7.tar.xz
MIPS: FW: Fix parsing u-boot environment
When reading u-boot's key=value pairs it should skip the '=' and not use the next argument. Signed-off-by: Alban Bedel <albeu@free.fr> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8357/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-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 ffd0345780ae..a0c361e6a5d2 100644
--- a/arch/mips/fw/lib/cmdline.c
+++ b/arch/mips/fw/lib/cmdline.c
@@ -68,7 +68,7 @@ char *fw_getenv(char *envname)
result = fw_envp(index + 1);
break;
} else if (fw_envp(index)[i] == '=') {
- result = (fw_envp(index + 1) + i);
+ result = fw_envp(index) + i + 1;
break;
}
}