]> git.sur5r.net Git - u-boot/commitdiff
Fix bug in 405 ethernet driver; allocated data not cleared!
authorstroese <stroese>
Fri, 2 Jul 2004 14:36:35 +0000 (14:36 +0000)
committerstroese <stroese>
Fri, 2 Jul 2004 14:36:35 +0000 (14:36 +0000)
cpu/ppc4xx/405gp_enet.c

index 572af621c1e52ccb406fb438b62fd7b685e42274..9d8e2b6deda19c3591b0eac20bf596a498b1e184 100644 (file)
@@ -944,6 +944,7 @@ int ppc_4xx_eth_initialize (bd_t * bis)
                                "Cannot allocate eth_device %d\n", eth_num);
                        return (-1);
                }
+               memset(dev, 0, sizeof(*dev));
                /* Allocate our private use data */
                hw = (EMAC_405_HW_PST) malloc (sizeof (*hw));
                if (hw == NULL) {
@@ -953,6 +954,7 @@ int ppc_4xx_eth_initialize (bd_t * bis)
                        free (dev);
                        return (-1);
                }
+               memset(hw, 0, sizeof(*hw));
 
                switch (eth_num) {
                case 0: