mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:30:58 +07:00
net: stmicro: fix a missing check of clk_prepare
clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2d822f2dba
commit
f86a3b8383
@ -59,7 +59,9 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
|
||||
gmac->clk_enabled = 1;
|
||||
} else {
|
||||
clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE);
|
||||
clk_prepare(gmac->tx_clk);
|
||||
ret = clk_prepare(gmac->tx_clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user