Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Shawn Lin and committed by
Heiko Stuebner
eb4e10c6 282312d1

+5
+5
drivers/clk/rockchip/clk-pll.c
··· 94 94 unsigned int val; 95 95 int delay = 24000000, ret; 96 96 97 + if (IS_ERR(grf)) { 98 + pr_err("%s: grf regmap not available\n", __func__); 99 + return PTR_ERR(grf); 100 + } 101 + 97 102 while (delay > 0) { 98 103 ret = regmap_read(grf, pll->lock_offset, &val); 99 104 if (ret) {