projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d822f2
)
net: stmicro: fix a missing check of clk_prepare
author
Kangjie Lu
<kjlu@umn.edu>
Wed, 26 Dec 2018 02:57:14 +0000
(20:57 -0600)
committer
David S. Miller
<davem@davemloft.net>
Fri, 28 Dec 2018 00:20:44 +0000
(16:20 -0800)
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>
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
index d07520fb969e687aa6ee5c384c7e23ecf3a8e38a..62ccbd47c1db2b60319051718a51fe159d2e7a54 100644
(file)
--- a/
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+++ b/
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
@@
-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;