Skip to content

Commit b2d6246

Browse files
jhovoldgregkh
authored andcommitted
soc: samsung: exynos-pmu: fix device leak on regmap lookup
commit 990eb9a upstream. Make sure to drop the reference taken when looking up the PMU device and its regmap. Note that holding a reference to a device does not prevent its regmap from going away so there is no point in keeping the reference. Fixes: 0b7c607 ("soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs") Cc: stable@vger.kernel.org # 6.9 Cc: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251121121852.16825-1-johan@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3ce2b4a commit b2d6246

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/soc/samsung/exynos-pmu.c

Lines changed: 2 additions & 0 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);

0 commit comments

Comments
 (0)