Skip to content

Commit 68f9bbf

Browse files
committed
Merge tag 'samsung-drivers-6.19-2-late' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers-late
Samsung SoC drivers for v6.19, part two Two fixes for Exynos PMU (Power Management Unit) driver: 1. Silence lockdep warning being actually a false positive, but quite disturbing during testing. Issue was introduced in v6.18. 2. Drop device refcount when requesting device regmap with exynos_get_pmu_regmap_by_phandle(). Issue was introduced much earlier (around v6.9), with code being rewritten in between. * tag 'samsung-drivers-6.19-2-late' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: exynos-pmu: fix device leak on regmap lookup soc: samsung: exynos-pmu: Fix structure initialization Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 8e2baac + 990eb9a commit 68f9bbf

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

drivers/soc/samsung/exynos-pmu.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ struct regmap *exynos_get_pmu_regmap_by_phandle(struct device_node *np,
346346
if (!dev)
347347
return ERR_PTR(-EPROBE_DEFER);
348348

349+
put_device(dev);
350+
349351
return syscon_node_to_regmap(pmu_np);
350352
}
351353
EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap_by_phandle);
@@ -585,10 +587,6 @@ static int setup_cpuhp_and_cpuidle(struct device *dev)
585587
if (!pmu_context->in_cpuhp)
586588
return -ENOMEM;
587589

588-
raw_spin_lock_init(&pmu_context->cpupm_lock);
589-
pmu_context->sys_inreboot = false;
590-
pmu_context->sys_insuspend = false;
591-
592590
/* set PMU to power on */
593591
for_each_online_cpu(cpu)
594592
gs101_cpuhp_pmu_online(cpu);
@@ -657,6 +655,9 @@ static int exynos_pmu_probe(struct platform_device *pdev)
657655

658656
pmu_context->pmureg = regmap;
659657
pmu_context->dev = dev;
658+
raw_spin_lock_init(&pmu_context->cpupm_lock);
659+
pmu_context->sys_inreboot = false;
660+
pmu_context->sys_insuspend = false;
660661

661662
if (pmu_context->pmu_data && pmu_context->pmu_data->pmu_cpuhp) {
662663
ret = setup_cpuhp_and_cpuidle(dev);

0 commit comments

Comments
 (0)