mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
clk: qcom: Fix accessing of clks element during the probe
There is access to platform descriptor clks init.name without checking, whether clks is present or not. This is leading to kernel crash during the device bootup. Move the init.name access after checking whether clks is valid or not. Change-Id: I7b27e5103822d6b2f499fb5f5e94ae9f9d4af34a Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This commit is contained in:
parent
59d3346dd2
commit
dbb563fda1
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
|
|
@ -509,14 +509,14 @@ static int clk_rpmh_probe(struct platform_device *pdev)
|
|||
hw_clks = desc->clks;
|
||||
|
||||
for (i = 0; i < desc->num_clks; i++) {
|
||||
const char *name = hw_clks[i]->init->name;
|
||||
const char *name;
|
||||
u32 res_addr;
|
||||
size_t aux_data_len;
|
||||
const struct bcm_db *data;
|
||||
|
||||
if (!hw_clks[i])
|
||||
continue;
|
||||
|
||||
name = hw_clks[i]->init->name;
|
||||
rpmh_clk = to_clk_rpmh(hw_clks[i]);
|
||||
res_addr = cmd_db_read_addr(rpmh_clk->res_name);
|
||||
if (!res_addr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue