Commit c933138d authored by Johan Hovold's avatar Johan Hovold Committed by Nishanth Menon
Browse files

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: a5caf031 ("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: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarAndrew Davis <afd@ti.com>
Link: https://patch.msgid.link/20251127134942.2121-1-johan@kernel.org


Signed-off-by: default avatarNishanth Menon <nm@ti.com>
parent 3fec51b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
	if (IS_ERR(base))
		return PTR_ERR(base);

	regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
	regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
	if (IS_ERR(regmap))
		return PTR_ERR(regmap);