public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment
@ 2014-11-07 11:23 Alban Bedel
  2014-11-07 11:23 ` [PATCH 2/2] MIPS: FW: Use kstrtoul() to parse unsigned long from the fw environment Alban Bedel
  2014-11-07 12:43 ` [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment Sergei Shtylyov
  0 siblings, 2 replies; 4+ messages in thread
From: Alban Bedel @ 2014-11-07 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mips, Ralf Baechle, Alban Bedel

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>
---
 arch/mips/fw/lib/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/fw/lib/cmdline.c b/arch/mips/fw/lib/cmdline.c
index ffd0345..cc5d168 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;
 				}
 			}
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-08 11:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-07 11:23 [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment Alban Bedel
2014-11-07 11:23 ` [PATCH 2/2] MIPS: FW: Use kstrtoul() to parse unsigned long from the fw environment Alban Bedel
2014-11-07 12:43 ` [PATCH 1/2] MIPS: FW: Fix parsing u-boot environment Sergei Shtylyov
2014-11-08 11:36   ` Alban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox