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:37:49 +0000 (15:37 +0100)
commit2f2a742cea6d028c703f53fb57919c101e6aef12
treeb191d5bd19dbeb6a88ab4b4973add292942d6a59
parent3092e216b75397f09611a6d409476e5d7e8a75c2
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