]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:05 +0000 (12:57 +0100)
commit3dfe2e1531c837f18c541e1db90f6ef7890a497c
tree3ab69c60a5f838a7069f6f985e22771da72c6146
parent9e7c63c69f57b1db1a8a1542359a6167ff8fcef1
clk: keystone: syscon-clk: fix regmap leak on probe failure

commit 9c75986a298f121ed2c6599b05e51d9a34e77068 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/keystone/syscon-clk.c