]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: phy: Fix API devm_usb_put_phy() can not release the phy
authorZijun Hu <quic_zijuhu@quicinc.com>
Sun, 20 Oct 2024 09:33:42 +0000 (17:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2024 03:37:48 +0000 (04:37 +0100)
commitfdce49b5da6e0fb6d077986dec3e90ef2b094b50
treed49d2ae0a0b5b0ad619341f69190c9a52c6b6fe9
parent1ab0b9ae587373f9f800b6fda01b8faf02b3530b
usb: phy: Fix API devm_usb_put_phy() can not release the phy

For devm_usb_put_phy(), its comment says it needs to invoke usb_put_phy()
to release the phy, but it does not do that actually, so it can not fully
undo what the API devm_usb_get_phy() does, that is wrong, fixed by using
devres_release() instead of devres_destroy() within the API.

Fixes: cedf8602373a ("usb: phy: move bulk of otg/otg.c to phy/phy.c")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241020-usb_phy_fix-v1-1-7f79243b8e1e@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/phy/phy.c