Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e90f686b authored by Fugang Duan's avatar Fugang Duan Committed by David S. Miller
Browse files

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: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f1c8d372
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3556,6 +3556,7 @@ fec_probe(struct platform_device *pdev)
	of_node_put(phy_node);
failed_ioremap:
	free_netdev(ndev);
	dev_id--;

	return ret;
}