net: (cpts) fix a missing check of clk_prepare
authorKangjie Lu <kjlu@umn.edu>
Wed, 26 Dec 2018 02:55:37 +0000 (20:55 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:20:53 +0000 (09:20 +0100)
commit7d7519148362f6aa00c26de4bdbf381d3ec45259
treea74ba9ffe583da6db6e452b510f815449ac7ea10
parent48b140f563ad61a7d0b529bc85c13417bb9f141d
net: (cpts) fix a missing check of clk_prepare

[ Upstream commit 2d822f2dbab7f4c820f72eb8570aacf3f35855bd ]

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/ti/cpts.c