提交 d3ec275f 编写于 作者: G Greg Kroah-Hartman 提交者: Yang Yingliang

Revert "net: stmicro: fix a missing check of clk_prepare"

stable inclusion
from linux-4.19.192
commit 84a7ffe7a4a3a742180109e273d2e400ed0c1ace

--------------------------------

commit bee1b051 upstream.

This reverts commit f86a3b83.

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: f86a3b83 ("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.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 442f6030
...@@ -59,9 +59,7 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) ...@@ -59,9 +59,7 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
gmac->clk_enabled = 1; gmac->clk_enabled = 1;
} else { } else {
clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE);
ret = clk_prepare(gmac->tx_clk); clk_prepare(gmac->tx_clk);
if (ret)
return ret;
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册