Skip to content

Commit c933138

Browse files
jhovoldnmenon
authored andcommitted
soc: ti: k3-socinfo: Fix regmap leak on probe failure
The mmio regmap allocated during probe is never freed. Switch to using the device managed allocator so that the regmap is released on probe failures (e.g. probe deferral) and on driver unbind. Fixes: a5caf03 ("soc: ti: k3-socinfo: Do not use syscon helper to build regmap") Cc: stable@vger.kernel.org # 6.15 Cc: Andrew Davis <afd@ti.com> Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20251127134942.2121-1-johan@kernel.org Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent 3fec51b commit c933138

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/soc/ti/k3-socinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
141141
if (IS_ERR(base))
142142
return PTR_ERR(base);
143143

144-
regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
144+
regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
145145
if (IS_ERR(regmap))
146146
return PTR_ERR(regmap);
147147

0 commit comments

Comments
 (0)