diff options
author | 2018-01-03 10:39:29 +0800 | |
---|---|---|
committer | 2018-01-03 11:40:41 -0500 | |
commit | e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e (patch) | |
tree | ff7c362b4170504689b5120594189108973a65a9 /drivers/net/ethernet/freescale | |
parent | vxlan: trivial indenting fix. (diff) | |
download | linux-e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e.tar.gz linux-e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e.tar.bz2 linux-e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 8184d2fca9be..6a4fc2b35488 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3556,6 +3556,7 @@ failed_phy: of_node_put(phy_node); failed_ioremap: free_netdev(ndev); + dev_id--; return ret; } |