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

Commit c3ce5b37 authored by Heiko Stuebner's avatar Heiko Stuebner
Browse files

soc: rockchip: power-domain: don't try to print the clock name in error case



When we never got the the clock-reference, i.e. when IS_ERR(clk) is true,
don't try to print the clock name via %pC as this of course produces a
null-pointer-dereference in __clk_get_name().

Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Reviewed-by: default avatarCaesar Wang <wxt@rock-chips.com>
parent 0cc59891
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -265,8 +265,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
		if (IS_ERR(clk)) {
			error = PTR_ERR(clk);
			dev_err(pmu->dev,
				"%s: failed to get clk %pC (index %d): %d\n",
				node->name, clk, i, error);
				"%s: failed to get clk at index %d: %d\n",
				node->name, i, error);
			goto err_out;
		}