Skip to content

Commit 059031a

Browse files
committed
Revert "net: stmicro: fix a missing check of clk_prepare"
commit bee1b05 upstream. This reverts commit f86a3b8. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit causes a memory leak when it is trying to claim it is properly handling errors. Revert this change and fix it up properly in a follow-on commit. Cc: Kangjie Lu <kjlu@umn.edu> Cc: David S. Miller <davem@davemloft.net> Fixes: f86a3b8 ("net: stmicro: fix a missing check of clk_prepare") Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210503115736.2104747-21-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d88f05c commit 059031a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
5050
gmac->clk_enabled = 1;
5151
} else {
5252
clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE);
53-
ret = clk_prepare(gmac->tx_clk);
54-
if (ret)
55-
return ret;
53+
clk_prepare(gmac->tx_clk);
5654
}
5755

5856
return 0;

0 commit comments

Comments
 (0)