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 <[EMAIL PROTECTED]>
---

Kim, sorry for this inconvenience.

 board/freescale/mpc8315erdb/mpc8315erdb.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c 
b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 7555ffb..3eecee2 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -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");
-- 
1.5.5.4

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to