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 <iwamatsu@nigauri.org>
CC: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
Nobuhiro Iwamatsu 2010-10-19 14:03:42 +09:00 committed by Wolfgang Denk
parent 72c4c33e98
commit de0b95762a

View 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;