瀏覽代碼

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>
Nobuhiro Iwamatsu 14 年之前
父節點
當前提交
de0b95762a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/fec_mxc.c

+ 1 - 0
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;