[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180115123417.817530912@linuxfoundation.org>
Date: Mon, 15 Jan 2018 13:34:25 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Fugang Duan <fugang.duan@....com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH 4.14 038/118] net: fec: restore dev_id in the cases of probe error
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fugang Duan <fugang.duan@....com>
[ 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@....com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/freescale/fec_main.c | 1 +
1 file changed, 1 insertion(+)
--- 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;
}
Powered by blists - more mailing lists