Skip to content

Commit

Permalink
net: fec: restore dev_id in the cases of probe error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fugang Duan authored and David S. Miller committed Jan 3, 2018
1 parent f1c8d37 commit e90f686
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3556,6 +3556,7 @@ fec_probe(struct platform_device *pdev)
of_node_put(phy_node);
failed_ioremap:
free_netdev(ndev);
dev_id--;

return ret;
}
Expand Down

0 comments on commit e90f686

Please sign in to comment.