From de0b95762a048a6815cd019b3a0e1acf0dbd70f4 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Tue, 19 Oct 2010 14:03:42 +0900 Subject: 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 --- drivers/net/fec_mxc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net') 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; -- cgit