diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2016-02-15 11:33:25 +0800 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2016-02-15 22:38:27 +0100 |
commit | eb4e10c61ddb513dae6508a16eedd2da59effb98 (patch) | |
tree | 918afd22493cee418c84d0f8893dd08349e169a9 | |
parent | 282312d1ac8aad4947a01c2caf79c9c0299fb495 (diff) | |
download | linux-eb4e10c61ddb513dae6508a16eedd2da59effb98.tar.bz2 |
clk: rockchip: check grf when waiting pll lock
rockchip_clk_get_grf pass on return value from
syscon_regmap_lookup_by_phandle, so we check grf to
make sure whether to do the following things or not.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r-- | drivers/clk/rockchip/clk-pll.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c index b7e66c9dd9f2..5de797e34d54 100644 --- a/drivers/clk/rockchip/clk-pll.c +++ b/drivers/clk/rockchip/clk-pll.c @@ -94,6 +94,11 @@ static int rockchip_pll_wait_lock(struct rockchip_clk_pll *pll) unsigned int val; int delay = 24000000, ret; + if (IS_ERR(grf)) { + pr_err("%s: grf regmap not available\n", __func__); + return PTR_ERR(grf); + } + while (delay > 0) { ret = regmap_read(grf, pll->lock_offset, &val); if (ret) { |