mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge "clk: qcom: common: Check for rclks before access"
This commit is contained in:
commit
7657cd1d27
1 changed files with 4 additions and 2 deletions
|
|
@ -247,7 +247,8 @@ static void qcom_cc_set_critical(struct device *dev, struct qcom_cc *cc)
|
|||
if (i >= cc->num_rclks)
|
||||
continue;
|
||||
|
||||
cc->rclks[i]->flags |= QCOM_CLK_IS_CRITICAL;
|
||||
if (cc->rclks[i])
|
||||
cc->rclks[i]->flags |= QCOM_CLK_IS_CRITICAL;
|
||||
}
|
||||
|
||||
of_property_for_each_u32(dev->of_node, "qcom,critical-devices", prop, p, i) {
|
||||
|
|
@ -265,7 +266,8 @@ static void qcom_cc_set_critical(struct device *dev, struct qcom_cc *cc)
|
|||
if (args.np != dev->of_node || clock_idx >= cc->num_rclks)
|
||||
continue;
|
||||
|
||||
cc->rclks[clock_idx]->flags |= QCOM_CLK_IS_CRITICAL;
|
||||
if (cc->rclks[clock_idx])
|
||||
cc->rclks[clock_idx]->flags |= QCOM_CLK_IS_CRITICAL;
|
||||
of_node_put(args.np);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue