net: stmicro: fix a missing check of clk_prepare
authorKangjie Lu <kjlu@umn.edu>
Wed, 26 Dec 2018 02:57:14 +0000 (20:57 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:34:57 +0000 (15:34 +0100)
commit712545ec9e81824fdaeb60b0ad121eba5512fafe
tree6c72216c5cc9729ad211e39c7ae42ee62ead8481
parentbe999aeebfb26ddcf97416969a344249d9cc2f58
net: stmicro: fix a missing check of clk_prepare

[ Upstream commit f86a3b83833e7cfe558ca4d70b64ebc48903efec ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c