linux/drivers/pmdomain
André Draszik 3e473aeca3 pmdomain: samsung: plug potential memleak during probe
commit 90c82941ad upstream.

of_genpd_add_provider_simple() could fail, in which case this code
leaks the domain name, pd->pd.name.

Use devm_kstrdup_const() to plug this leak. As a side-effect, we can
simplify existing error handling.

Fixes: c09a3e6c97 ("soc: samsung: pm_domains: Convert to regular platform driver")
Cc: stable@vger.kernel.org
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-11-24 10:36:04 +01:00
..
actions pmdomain: Use device_get_match_data() 2023-10-17 11:45:11 +02:00
amlogic pmdomain: amlogic: fix T7 ISP secpower 2025-03-28 22:03:31 +01:00
apple pmdomain: apple: Add "apple,t8103-pmgr-pwrstate" 2025-11-13 15:34:06 -05:00
arm pmdomain: arm: scmi: Fix genpd leak on provider registration failure 2025-11-24 10:36:04 +01:00
bcm pmdomain: raspberrypi-power: set flag GENPD_FLAG_ACTIVE_WAKEUP 2024-08-14 14:22:39 +02:00
imx pmdomain: imx: Fix reference count leak in imx_gpc_remove 2025-11-24 10:36:04 +01:00
mediatek pmdomain: mediatek: make use of dev_err_cast_probe() 2024-09-13 12:48:34 +02:00
qcom pmdomain: qcom-cpr: Fix the return of uninitialized variable 2024-10-02 12:38:53 +02:00
renesas pmdomain: renesas: rcar: Remove obsolete nullify checks 2025-05-29 11:03:21 +02:00
rockchip pmdomain: rockchip: Add gating masks for rk3576 2024-09-13 13:01:47 +02:00
samsung pmdomain: samsung: plug potential memleak during probe 2025-11-24 10:36:04 +01:00
st pmdomain: st: Add a Kconfig option for the ux500 power domain 2023-10-04 23:41:56 +02:00
starfive pmdomain: starfive: Update prefixes for AON power domain 2023-10-04 23:41:57 +02:00
sunxi pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
tegra pmdomain: core: constify of_phandle_args in xlate 2024-02-14 10:26:11 +01:00
ti pmdomain: ti: Select PM_GENERIC_DOMAINS 2025-08-20 18:30:22 +02:00
xilinx pmdomain: core: constify of_phandle_args in xlate 2024-02-14 10:26:11 +01:00
core.c pmdomain: core: Reset genpd->states to avoid freeing invalid data 2025-06-27 11:11:27 +01:00
governor.c pmdomain: governor: Consider CPU latency tolerance from pm_domain_cpu_gov 2025-07-24 08:56:27 +02:00
Kconfig pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem 2023-11-23 17:32:53 +01:00
Makefile PM: domains: Move genpd and its governor to the pmdomain subsystem 2023-12-18 12:49:48 +01:00