From: Nobuhiro Iwamatsu Date: Tue, 19 Oct 2010 05:03:42 +0000 (+0900) Subject: net: fec_mxc: Add initialized eth_device structure X-Git-Tag: v2010.12-rc2~74 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=de0b95762a048a6815cd019b3a0e1acf0dbd70f4;p=oweals%2Fu-boot.git net: fec_mxc: Add initialized eth_device structure This prevents access to the member of eth_device which is not initialized. Signed-off-by: Nobuhiro Iwamatsu CC: Ben Warren --- diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 3f09c2b652..c17f9379bf 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -710,6 +710,7 @@ static int fec_probe(bd_t *bd) puts("fec_mxc: not enough malloc memory\n"); return -ENOMEM; } + memset(edev, 0, sizeof(*edev)); edev->priv = fec; edev->init = fec_init; edev->send = fec_send;