diff options
author | Alban Bedel <albeu@free.fr> | 2014-11-08 06:39:38 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:25 -0500 |
commit | 4a792e56cfdbe000d01c01ce356d13f39f5494e7 (patch) | |
tree | b2e5afeabe6b945f01d079a4595dacf0354e1df7 /arch/mips/fw | |
parent | e2afb7de6e7dad21f9d709f80f23bbd3c5bdad11 (diff) |
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.c | 2 |
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) | |||
68 | result = fw_envp(index + 1); | 68 | result = fw_envp(index + 1); |
69 | break; | 69 | break; |
70 | } else if (fw_envp(index)[i] == '=') { | 70 | } else if (fw_envp(index)[i] == '=') { |
71 | result = (fw_envp(index + 1) + i); | 71 | result = fw_envp(index) + i + 1; |
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | } | 74 | } |