From: Fugang Duan Date: Wed, 3 Jan 2018 02:39:29 +0000 (+0800) Subject: net: fec: restore dev_id in the cases of probe error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=90437795272dfe4b5abaa6dcc612ed0b304b4fb5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index faf7cdc97ebf..2250639beef0 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3543,6 +3543,7 @@ failed_phy: of_node_put(phy_node); failed_ioremap: free_netdev(ndev); + dev_id--; return ret; }