Skip to content

Commit

Permalink
clk: rockchip: check grf when waiting pll lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Lin authored and Heiko Stuebner committed Feb 15, 2016
1 parent 282312d commit eb4e10c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/clk/rockchip/clk-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit eb4e10c

Please sign in to comment.