summaryrefslogtreecommitdiffstats
path: root/arch/mips/fw
diff options
context:
space:
mode:
authorAlban Bedel <albeu@free.fr>2014-11-08 12:39:38 +0100
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 07:45:25 +0100
commit4a792e56cfdbe000d01c01ce356d13f39f5494e7 (patch)
treeb2e5afeabe6b945f01d079a4595dacf0354e1df7 /arch/mips/fw
parentTC: Error handling clean-ups (diff)
downloadlinux-4a792e56cfdbe000d01c01ce356d13f39f5494e7.tar.xz
linux-4a792e56cfdbe000d01c01ce356d13f39f5494e7.zip
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>
Diffstat (limited to 'arch/mips/fw')
-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;
}
}