]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
83xx: mpc8315erdb: fix silly thinko in fdt_tsec1_fixup
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Thu, 10 Jul 2008 13:20:51 +0000 (17:20 +0400)
committerKim Phillips <kim.phillips@freescale.com>
Wed, 16 Jul 2008 19:16:44 +0000 (14:16 -0500)
The thinko was quite silly indeed, I messed with !ptr. Normally this
would trigger some fault, but in U-Boot NULL pointer is equal to phys
0, so the code was working still, just didn't actually test mpc8315erdb
environment variable value. Heh.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
board/freescale/mpc8315erdb/mpc8315erdb.c

index 7555ffbdd6d62c9e82c6ce04f64d06f4b7b6dfb3..3eecee2519a5eba17654f2c5f23f0a390bf5c1a8 100644 (file)
@@ -128,15 +128,16 @@ void fdt_tsec1_fixup(void *fdt, bd_t *bd)
        const char *path;
        int ret;
 
-       if (!mpc8315erdb) {
-               if (!strcmp(mpc8315erdb, "tsec1")) {
-                       return;
-               } else if (strcmp(mpc8315erdb, "ulpi")) {
-                       printf("WARNING: wrong `mpc8315erdb' environment "
-                              "variable specified: `%s'. Should be `ulpi' "
-                              "or `tsec1'.\n", mpc8315erdb);
-                       return;
-               }
+       if (!mpc8315erdb)
+               return;
+
+       if (!strcmp(mpc8315erdb, "tsec1")) {
+               return;
+       } else if (strcmp(mpc8315erdb, "ulpi")) {
+               printf("WARNING: wrong `mpc8315erdb' environment "
+                      "variable specified: `%s'. Should be `ulpi' "
+                      "or `tsec1'.\n", mpc8315erdb);
+               return;
        }
 
        ret = fdt_path_offset(fdt, "/aliases");