diff options
| author | Christophe Jaillet <[email protected]> | 2017-02-10 20:17:06 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-02-14 03:24:31 +0000 |
| commit | 1f8f1e89e0183e9504dfa45e9b87c44cff2e66c6 (patch) | |
| tree | 35e8906452a9b79882a99a154db4afeb086f630c /drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | |
| parent | Merge tag 'rxrpc-rewrite-20170210' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
| download | kernel-1f8f1e89e0183e9504dfa45e9b87c44cff2e66c6.tar.gz kernel-1f8f1e89e0183e9504dfa45e9b87c44cff2e66c6.zip | |
net: fs_enet: Fix an error handling path
'of_node_put(fpi->phy_node)' should also be called if we branch to
'out_deregister_fixed_link' error handling path.
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c')
| -rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 54e3ce9bd94c..5c6426756d11 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -1045,10 +1045,10 @@ out_cleanup_data: out_free_dev: free_netdev(ndev); out_put: - of_node_put(fpi->phy_node); if (fpi->clk_per) clk_disable_unprepare(fpi->clk_per); out_deregister_fixed_link: + of_node_put(fpi->phy_node); if (of_phy_is_fixed_link(ofdev->dev.of_node)) of_phy_deregister_fixed_link(ofdev->dev.of_node); out_free_fpi: |
