]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/prodrive/p3mx/p3mx.c
Fix incorrect use of getenv() before relocation
[karo-tx-uboot.git] / board / prodrive / p3mx / p3mx.c
index 05eca52e0e86f0116c29c8b919b12d58c406cb94..09e4f823f0147f88b0ed1b8a23a4bbffa0de4c4b 100644 (file)
@@ -335,13 +335,14 @@ void after_reloc (ulong dest_addr, gd_t * gd)
 
 int checkboard (void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: %s", CONFIG_SYS_BOARD_NAME);
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');