Fix incorrect use of getenv() before relocation
[oweals/u-boot.git] / board / ixdp425 / ixdp425.c
index 43ac8f6a42a6e9aa5e5ae6f9154d98887cb360b3..a29d5843892c20dd5010ad43bd5fea4dd1f7d334 100644 (file)
@@ -83,7 +83,8 @@ int board_init (void)
  */
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
 #ifdef CONFIG_IXDPG425
        puts("Board: IXDPG425 - Intel Network Gateway Reference Platform");
@@ -91,9 +92,9 @@ int checkboard(void)
        puts("Board: IXDP425 - Intel Development Platform");
 #endif
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');