]> git.ipfire.org Git - thirdparty/linux.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)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Dec 2025 17:24:58 +0000 (22:54 +0530)
commit4914d67da947031d6f645c81c74f7879e0844d5d
tree5d591f4d63f9e45240141aa855f393dae6e0abe5
parentd543d3eb06873f0ab8edb0d1f8364e9af93544a0
phy: ti: gmii-sel: fix regmap leak on probe failure

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>
drivers/phy/ti/phy-gmii-sel.c