mirror of
https://github.com/torvalds/linux.git
synced 2026-10-08 11:36:02 +02:00
exynos_get_pmu_regmap() obtains a device_node via of_find_matching_node()
and passes it to exynos_get_pmu_regmap_by_phandle(np, NULL). With
propname == NULL the callee uses np directly and does not drop a
reference, so the reference taken by of_find_matching_node() is leaked on
every call -- including on each -EPROBE_DEFER retry of the only in-tree
caller, exynos_retention_init() in the Exynos pinctrl driver.
Annotate np with the __free(device_node) cleanup attribute so the
reference is released when the function returns.
Found by static analysis tool CodeQL.
Fixes:
|
||
|---|---|---|
| .. | ||
| exynos-asv.c | ||
| exynos-asv.h | ||
| exynos-chipid.c | ||
| exynos-pmu.c | ||
| exynos-pmu.h | ||
| exynos-regulator-coupler.c | ||
| exynos-usi.c | ||
| exynos4-pmu.c | ||
| exynos3250-pmu.c | ||
| exynos5250-pmu.c | ||
| exynos5420-pmu.c | ||
| exynos5422-asv.c | ||
| exynos5422-asv.h | ||
| gs101-pmu.c | ||
| Kconfig | ||
| Makefile | ||
| s3c-pm-check.c | ||