diff options
| author | Wang Xiaolei <xiaoleiwangxiaolei@gmail.com> | 2026-10-26 12:02:30 +0800 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-11-04 14:45:30 +0100 |
| commit | 828450fe10ae389d7e287b2660de15a5f79957b0 (patch) | |
| tree | b072f7bbba8aa786ef8d2ebe8ff02dd66ccb0457 /scripts/Makefile.thinlto | |
| parent | 11e7771360bb3e01851b0b5689d3029a61a71104 (diff) | |
| download | linux-next-828450fe10ae389d7e287b2660de15a5f79957b0.tar.gz linux-next-828450fe10ae389d7e287b2660de15a5f79957b0.zip | |
pinctrl: imx: scmi: replace custom dt_free_map with pinctrl_utils_free_map
pinctrl_scmi_imx_dt_node_to_map() kmemdup_array()s the pinctrl configs
of every pin into map[i].data.configs.configs, but the driver's own
pinctrl_scmi_imx_dt_free_map() only frees the map array itself. The
pinctrl core releases maps through pinctrl_dt_free_maps(), which calls
dt_free_map(); the duplicated configs are therefore never freed and leak
every time the DT node is parsed, e.g. on each (deferred) probe attempt.
Replace the custom dt_free_map with the core helper
pinctrl_utils_free_map(), which frees the configs of each
PIN_MAP_TYPE_CONFIGS_* map before freeing the map itself. Its
signature matches pinctrl_ops.dt_free_map(), so the driver-specific
implementation can be dropped entirely.
Detected with kmemleak on an i.MX95 board (FRDM-IMX95).
Fixes: b755521fd6eb ("pinctrl: imx: support SCMI pinctrl protocol for i.MX95")
Signed-off-by: Wang Xiaolei <xiaoleiwangxiaolei@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
