Skip to content
/ linux Public

Commit 4581365

Browse files
jhovoldSasha Levin
authored andcommitted
soc: ti: k3-socinfo: Fix regmap leak on probe failure
[ Upstream commit c933138 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8d9ddad commit 4581365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/ti/k3-socinfo.c

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

87-
regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
87+
regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
8888
if (IS_ERR(regmap))
8989
return PTR_ERR(regmap);
9090

0 commit comments

Comments
 (0)