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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:21 +0000 (09:45 +0100)
commit90437795272dfe4b5abaa6dcc612ed0b304b4fb5
tree12e128513d5c55f62e11c2d30ee9c9aea95f8712
parent5edbe3c0249f54578636b71377861d579b1781cf
net: fec: restore dev_id in the cases of probe error

[ Upstream commit e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/fec_main.c