]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/amcc/luan/luan.c
Fix incorrect use of getenv() before relocation
[karo-tx-uboot.git] / board / amcc / luan / luan.c
index b2595a8ec1a8c29f6521c6119f361948c50d7462..d4b620e857095681e0b3ef3ff32e4e6652a41d48 100644 (file)
@@ -105,13 +105,14 @@ int misc_init_r(void)
  ************************************************************************/
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: Luan - AMCC PPC440SP Evaluation Board");
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');