author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> 2021-08-21 09:35:23 +0200
committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-09-03 10:22:54 +0200
commit: a73e59683548413469cb8bd6f1c42a318ba1a4ea
parent: 01951aeafc407b6e1c5d4e865286dae0ff92b1cb
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 1 deletion
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 860c18fb7aae..80399c8980bd 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -677,11 +677,13 @@ static int xge_probe(struct platform_device *pdev)
ret = register_netdev(ndev);
if (ret) {
netdev_err(ndev, "Failed to register netdev\n");
- goto err;
+ goto err_mdio_remove;
}
return 0;
+err_mdio_remove:
+ xge_mdio_remove(ndev);
err:
free_netdev(ndev);