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

Commit 390e9827 authored by David Collins's avatar David Collins
Browse files

clk: qcom: clk-aop-qmp: use correct name pointer before clock registration



clk_aop_qmp_prepare() is called from aop_qmp_clk_probe() before
devm_clk_register() is called.  This means that clock hw->core
pointers are NULL and clk_hw_get_name(hw) triggers a NULL pointer
dereference.  Use hw->init->name instead of clk_hw_get_name(hw)
to avoid the NULL pointer dereference.

Change-Id: I548df6518053260d44227adc0479b1ea52a81fc9
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 3cd974e4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -149,7 +149,8 @@ static int clk_aop_qmp_prepare(struct clk_hw *hw)
	ret = mbox_send_message(clk->mbox, &pkt);
	if (ret < 0) {
		pr_err("Failed to send clk prepare request for %s, ret %d\n",
					clk_hw_get_name(hw), ret);
				hw->core ? clk_hw_get_name(hw) : hw->init->name,
					ret);
		goto err;
	}