Skip to content

Commit e956c88

Browse files
committed
Merge tag 'cpufreq-arm-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreq
Merge ARM cpufreq updates for 6.8 from Viresh Kumar: "- Check return value of a function in SCMI cpufreq driver (Alexandra Diupina). - Use 'NULL' instead of '0' in Armada cpufreq driver (Gregory CLEMENT)." * tag 'cpufreq-arm-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: armada-8k: Fix parameter type warning cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()
2 parents e950131 + 0990319 commit e956c88

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/cpufreq/armada-8k-cpufreq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void __init armada_8k_get_sharing_cpus(struct clk *cur_clk,
5757
continue;
5858
}
5959

60-
clk = clk_get(cpu_dev, 0);
60+
clk = clk_get(cpu_dev, NULL);
6161
if (IS_ERR(clk)) {
6262
pr_warn("Cannot get clock for CPU %d\n", cpu);
6363
} else {
@@ -165,7 +165,7 @@ static int __init armada_8k_cpufreq_init(void)
165165
continue;
166166
}
167167

168-
clk = clk_get(cpu_dev, 0);
168+
clk = clk_get(cpu_dev, NULL);
169169

170170
if (IS_ERR(clk)) {
171171
pr_err("Cannot get clock for CPU %d\n", cpu);

drivers/cpufreq/scmi-cpufreq.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,11 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)
334334

335335
#ifdef CONFIG_COMMON_CLK
336336
/* dummy clock provider as needed by OPP if clocks property is used */
337-
if (of_property_present(dev->of_node, "#clock-cells"))
338-
devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
337+
if (of_property_present(dev->of_node, "#clock-cells")) {
338+
ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
339+
if (ret)
340+
return dev_err_probe(dev, ret, "%s: registering clock provider failed\n", __func__);
341+
}
339342
#endif
340343

341344
ret = cpufreq_register_driver(&scmi_cpufreq_driver);

0 commit comments

Comments
 (0)