net: fec_mxc: Fix corruption of device tree blob

Modifying content of dev->name leads to the device tree corruption
because it points to the node name located there.

Signed-off-by: Daniel Strnad <strnadda@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Daniel Strnad 2017-02-02 12:11:40 +01:00 committed by Joe Hershberger
parent 655217d968
commit 5ad9204fa9

View file

@ -1240,7 +1240,6 @@ static int fecmxc_probe(struct udevice *dev)
}
fec_reg_setup(priv);
fec_set_dev_name((char *)dev->name, dev_id);
priv->dev_id = (dev_id == -1) ? 0 : dev_id;
return 0;