diff options
Diffstat (limited to 'arch/mips/fw')
-rw-r--r-- | arch/mips/fw/lib/cmdline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/fw/lib/cmdline.c b/arch/mips/fw/lib/cmdline.c index ffd0345780ae..6ecda64ad184 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 | } |
@@ -88,13 +88,13 @@ unsigned long fw_getenvl(char *envname) | |||
88 | { | 88 | { |
89 | unsigned long envl = 0UL; | 89 | unsigned long envl = 0UL; |
90 | char *str; | 90 | char *str; |
91 | long val; | ||
92 | int tmp; | 91 | int tmp; |
93 | 92 | ||
94 | str = fw_getenv(envname); | 93 | str = fw_getenv(envname); |
95 | if (str) { | 94 | if (str) { |
96 | tmp = kstrtol(str, 0, &val); | 95 | tmp = kstrtoul(str, 0, &envl); |
97 | envl = (unsigned long)val; | 96 | if (tmp) |
97 | envl = 0; | ||
98 | } | 98 | } |
99 | 99 | ||
100 | return envl; | 100 | return envl; |