]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/ns8382x.c
DaVinci Schmoogie: Add ARM Relocation Support
[u-boot] / drivers / net / ns8382x.c
index a2d61afec7a66b535b080b078494b78397c49605..45402cc0ec3d7ed8ed79f1c88d058ff22ebfe49a 100644 (file)
@@ -340,6 +340,11 @@ ns8382x_initialize(bd_t * bis)
                }
 
                dev = (struct eth_device *) malloc(sizeof *dev);
+               if (!dev) {
+                       printf("ns8382x: Can not allocate memory\n");
+                       break;
+               }
+               memset(dev, 0, sizeof(*dev));
 
                sprintf(dev->name, "dp8382x#%d", card_number);
                dev->iobase = bus_to_phys(iobase);
@@ -445,7 +450,7 @@ ns8382x_initialize(bd_t * bis)
        Read and write MII registers using software-generated serial MDIO
        protocol.  See the MII specifications or DP83840A data sheet for details.
 
-       The maximum data clock rate is 2.5 Mhz.  To meet minimum timing we
+       The maximum data clock rate is 2.5 MHz.  To meet minimum timing we
        must flush writes to the PCI bus with a PCI read. */
 #define mdio_delay(mdio_addr) INL(dev, mdio_addr)