From: stroese Date: Fri, 2 Jul 2004 14:36:35 +0000 (+0000) Subject: Fix bug in 405 ethernet driver; allocated data not cleared! X-Git-Tag: LABEL_2006_03_12_0025~530 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18f71f27aea4b10c7cb53731a5d401c5a78027fc;p=u-boot Fix bug in 405 ethernet driver; allocated data not cleared! --- diff --git a/cpu/ppc4xx/405gp_enet.c b/cpu/ppc4xx/405gp_enet.c index 572af621c1..9d8e2b6ded 100644 --- a/cpu/ppc4xx/405gp_enet.c +++ b/cpu/ppc4xx/405gp_enet.c @@ -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: