Skip to content

Commit 9c75986

Browse files
jhovoldbebarino
authored andcommitted
clk: keystone: syscon-clk: 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: a250cd4 ("clk: keystone: syscon-clk: 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> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent cf33f0b commit 9c75986

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/clk/keystone/syscon-clk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
129129
if (IS_ERR(base))
130130
return PTR_ERR(base);
131131

132-
regmap = regmap_init_mmio(dev, base, &ti_syscon_regmap_cfg);
132+
regmap = devm_regmap_init_mmio(dev, base, &ti_syscon_regmap_cfg);
133133
if (IS_ERR(regmap))
134134
return dev_err_probe(dev, PTR_ERR(regmap),
135135
"failed to get regmap\n");

0 commit comments

Comments
 (0)