net: fec: restore dev_id in the cases of probe error

The static variable dev_id always plus one before netdev registerred.
It should restore the dev_id value in the cases of probe error.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Fugang Duan 2018-01-03 10:39:29 +08:00 committed by David S. Miller
parent f1c8d3720f
commit e90f686b43

View File

@ -3556,6 +3556,7 @@ fec_probe(struct platform_device *pdev)
of_node_put(phy_node);
failed_ioremap:
free_netdev(ndev);
dev_id--;
return ret;
}