]> git.ipfire.org Git - thirdparty/linux.git/commit
clk: keystone: syscon-clk: fix regmap leak on probe failure
authorJohan Hovold <johan@kernel.org>
Thu, 27 Nov 2025 13:42:43 +0000 (14:42 +0100)
committerStephen Boyd <sboyd@kernel.org>
Sun, 30 Nov 2025 20:05:45 +0000 (12:05 -0800)
commit9c75986a298f121ed2c6599b05e51d9a34e77068
tree2a7c7c71ea8709ef36749491f09b0c28f86c66e9
parentcf33f0b7df13685234ccea7be7bfe316b60db4db
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: a250cd4c1901 ("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>
drivers/clk/keystone/syscon-clk.c