]> git.sur5r.net Git - u-boot/blobdiff - disk/part.c
powerpc/p2041rdb: add NAND and NAND boot support
[u-boot] / disk / part.c
index 13723f23b3113c74fa7b2590de65bf0d7d3c5a6b..8ca5d4bdfc7a7203dede5d7b6bc6f8a226ca0b5a 100644 (file)
@@ -80,11 +80,14 @@ block_dev_desc_t *get_dev(char* ifname, int dev)
        block_dev_desc_t* (*reloc_get_dev)(int dev);
        char *name;
 
+       if (!ifname)
+               return NULL;
+
        name = drvr->name;
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
        name += gd->reloc_off;
 #endif
-       while (name) {
+       while (drvr->name) {
                name = drvr->name;
                reloc_get_dev = drvr->get_dev;
 #ifdef CONFIG_NEEDS_MANUAL_RELOC