mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
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: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
860fa9a8ce
commit
b61011ada5
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue