diff options
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r-- | drivers/net/davinci_emac.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 29a4f06fbfcf..dcc4a170b0f3 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -1781,8 +1781,8 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev) | |||
1781 | ndev = alloc_etherdev(sizeof(struct emac_priv)); | 1781 | ndev = alloc_etherdev(sizeof(struct emac_priv)); |
1782 | if (!ndev) { | 1782 | if (!ndev) { |
1783 | dev_err(&pdev->dev, "error allocating net_device\n"); | 1783 | dev_err(&pdev->dev, "error allocating net_device\n"); |
1784 | clk_put(emac_clk); | 1784 | rc = -ENOMEM; |
1785 | return -ENOMEM; | 1785 | goto free_clk; |
1786 | } | 1786 | } |
1787 | 1787 | ||
1788 | platform_set_drvdata(pdev, ndev); | 1788 | platform_set_drvdata(pdev, ndev); |
@@ -1796,7 +1796,8 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev) | |||
1796 | pdata = pdev->dev.platform_data; | 1796 | pdata = pdev->dev.platform_data; |
1797 | if (!pdata) { | 1797 | if (!pdata) { |
1798 | dev_err(&pdev->dev, "no platform data\n"); | 1798 | dev_err(&pdev->dev, "no platform data\n"); |
1799 | return -ENODEV; | 1799 | rc = -ENODEV; |
1800 | goto probe_quit; | ||
1800 | } | 1801 | } |
1801 | 1802 | ||
1802 | /* MAC addr and PHY mask , RMII enable info from platform_data */ | 1803 | /* MAC addr and PHY mask , RMII enable info from platform_data */ |
@@ -1929,8 +1930,9 @@ no_dma: | |||
1929 | iounmap(priv->remap_addr); | 1930 | iounmap(priv->remap_addr); |
1930 | 1931 | ||
1931 | probe_quit: | 1932 | probe_quit: |
1932 | clk_put(emac_clk); | ||
1933 | free_netdev(ndev); | 1933 | free_netdev(ndev); |
1934 | free_clk: | ||
1935 | clk_put(emac_clk); | ||
1934 | return rc; | 1936 | return rc; |
1935 | } | 1937 | } |
1936 | 1938 | ||