X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/bc03d2d1845271b9732a1add2955946a95d48d61..8b2c7d0c931af2ea427f3a22d2b7b373f8d6cd1a:/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c?ds=sidebyside diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c index a288b073c..c2e1dcbae 100644 --- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c +++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c @@ -32,7 +32,7 @@ #include -static char **prom_envp; +static char **prom_envp = NULL; void setup_prom_printf(int); void prom_printf(char *, ...); @@ -106,7 +106,9 @@ void __init prom_init(void) { char *cmd; - prom_envp = (char **)fw_arg2; + if ((fw_arg2 & 3) == 0) { + prom_envp = (char **)fw_arg2; + } adm5120_info_init();