Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb4e10c6 authored by Shawn Lin's avatar Shawn Lin Committed by Heiko Stuebner
Browse files

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: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 282312d1
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -94,6 +94,11 @@ static int rockchip_pll_wait_lock(struct rockchip_clk_pll *pll)
	unsigned int val;
	unsigned int val;
	int delay = 24000000, ret;
	int delay = 24000000, ret;


	if (IS_ERR(grf)) {
		pr_err("%s: grf regmap not available\n", __func__);
		return PTR_ERR(grf);
	}

	while (delay > 0) {
	while (delay > 0) {
		ret = regmap_read(grf, pll->lock_offset, &val);
		ret = regmap_read(grf, pll->lock_offset, &val);
		if (ret) {
		if (ret) {