net: fec: restore dev_id in the cases of probe error
authorFugang Duan <fugang.duan@nxp.com>
Wed, 3 Jan 2018 02:39:29 +0000 (10:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 16:40:41 +0000 (11:40 -0500)
commite90f686b4358d7d7e5dbaa48b8e78c9a4e41826e
treeff7c362b4170504689b5120594189108973a65a9
parentf1c8d3720f2e6c8c2b209120678236debd0360e5
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>
drivers/net/ethernet/freescale/fec_main.c