Am Mittwoch, 6. Mai 2020, 12:09:03 CEST schrieb Dafna Hirschfeld: > In function rockchip_dt_node_to_map, a new_map variable is > allocated by: > > new_map = devm_kcalloc(pctldev->dev, map_num, sizeof(*new_map), > GFP_KERNEL); > > This uses devres and attaches new_map to the pinctrl driver. > This cause a leak since new_map is not released when the probed > driver is removed. Fix it by using kcalloc to allocate new_map > and free it in `rockchip_dt_free_map` > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxxxxxx> Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>