]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: ti: gmii-sel: fix regmap leak on probe failure
authorJohan Hovold <johan@kernel.org>
Thu, 27 Nov 2025 13:48:34 +0000 (14:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:18:44 +0000 (11:18 +0100)
commit66fcfceee25490567b7d548718fc47b8d449a5fa
tree892ef496a746d4cae08bd08db9d54b0becd52caf
parent9659ba4217de2d03d7316c54db9546f98435601f
phy: ti: gmii-sel: fix regmap leak on probe failure

commit 4914d67da947031d6f645c81c74f7879e0844d5d upstream.

The mmio regmap that may be 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: 5ab90f40121a ("phy: ti: gmii-sel: Do not use syscon helper to build regmap")
Cc: stable@vger.kernel.org # 6.14
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/20251127134834.2030-1-johan@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/ti/phy-gmii-sel.c