mirror of https://gitee.com/openkylin/linux.git
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:
parent
f1c8d3720f
commit
e90f686b43
|
@ -3556,6 +3556,7 @@ fec_probe(struct platform_device *pdev)
|
|||
of_node_put(phy_node);
|
||||
failed_ioremap:
|
||||
free_netdev(ndev);
|
||||
dev_id--;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue