Fix problem in ppc4xx eth-driver without ethaddr (only without
CONFIG_NET_MULTI set)
Patch by Stefan Roese, 10 Oct 2005
diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
index 34f6e97..d3f1de4 100644
--- a/cpu/ppc4xx/4xx_enet.c
+++ b/cpu/ppc4xx/4xx_enet.c
@@ -139,7 +139,7 @@
 static uint32_t mal_ier;
 
 #if !defined(CONFIG_NET_MULTI)
-struct eth_device *emac0_dev;
+struct eth_device *emac0_dev = NULL;
 #endif
 
 
@@ -306,8 +306,10 @@
 
 	/* before doing anything, figure out if we have a MAC address */
 	/* if not, bail */
-	if (memcmp (dev->enetaddr, "\0\0\0\0\0\0", 6) == 0)
+	if (memcmp (dev->enetaddr, "\0\0\0\0\0\0", 6) == 0) {
+		printf("ERROR: ethaddr not set!\n");
 		return -1;
+	}
 
 #if defined(CONFIG_440GX)
 	/* Need to get the OPB frequency so we can access the PHY */
@@ -1486,12 +1488,16 @@
 int eth_init (bd_t *bis)
 {
 	ppc_4xx_eth_initialize(bis);
-	return(ppc_4xx_eth_init(emac0_dev, bis));
+	if (emac0_dev) {
+		return ppc_4xx_eth_init(emac0_dev, bis);
+	} else {
+		printf("ERROR: ethaddr not set!\n");
+		return -1;
+	}
 }
 
 int eth_send(volatile void *packet, int length)
 {
-
 	return (ppc_4xx_eth_send(emac0_dev, packet, length));
 }