]> git.sur5r.net Git - u-boot/commitdiff
net: fec_mxc: Add initialized eth_device structure
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tue, 19 Oct 2010 05:03:42 +0000 (14:03 +0900)
committerWolfgang Denk <wd@denx.de>
Sun, 14 Nov 2010 22:17:42 +0000 (23:17 +0100)
This prevents access to the member of eth_device which is not initialized.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Ben Warren <biggerbadderben@gmail.com>
drivers/net/fec_mxc.c

index 3f09c2b65263c324c5bc3d2cd14bd21ce45641e0..c17f9379bf93a3ff663395f0f3b56c8aa5fa60c9 100644 (file)
@@ -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;