linux-stable/drivers/phy
Zijun Hu 5ebdc6be16 phy: core: Fix an OF node refcount leakage in _of_phy_get()
_of_phy_get() will directly return when suffers of_device_is_compatible()
error, but it forgets to decrease refcount of OF node @args.np before error
return, the refcount was increased by previous of_parse_phandle_with_args()
so causes the OF node's refcount leakage.

Fix by decreasing the refcount via of_node_put() before the error return.

Fixes: b7563e2796 ("phy: work around 'phys' references to usb-nop-xceiv devices")
Cc: stable@vger.kernel.org
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-4-40ae28f5015a@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 19:55:37 +05:30
..
allwinner phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30
amlogic phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
broadcom phy: usb: Toggle the PHY power during init 2024-12-04 19:45:35 +05:30
cadence phy-for-6.13 2024-11-27 13:33:43 -08:00
freescale phy-for-6.13 2024-11-27 13:33:43 -08:00
hisilicon phy: hisilicon: usb2: Simplify with scoped for each OF child loop 2024-08-30 13:26:37 +05:30
ingenic phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
intel phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30
lantiq phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
marvell phy: mvebu-cp110-utmi: support swapping d+/d- lanes by dts property 2024-10-07 12:00:19 +05:30
mediatek phy: mediatek: xsphy: Simplify with scoped for each OF child loop 2024-08-30 13:26:37 +05:30
microchip phy: lan969x-serdes: add support for lan969x serdes driver 2024-10-22 00:02:04 +05:30
motorola phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30
mscc phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
nuvoton phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY 2024-08-29 23:52:37 +05:30
qualcomm phy: qcom-qmp: Fix register name in RX Lane config of SC8280XP 2024-12-04 20:02:27 +05:30
ralink phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
realtek USB / Thunderbolt (USB4) changes for 6.13-rc1 2024-11-29 11:19:31 -08:00
renesas phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30
rockchip phy: rockchip: samsung-hdptx: Set drvdata before enabling runtime PM 2024-12-08 21:42:07 +05:30
samsung phy-for-6.12 2024-09-23 14:05:10 -07:00
socionext phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
st phy: stm32: work around constant-value overflow assertion 2024-12-04 20:04:22 +05:30
starfive phy: starfive: jh7110-usb: Fix link configuration to controller 2024-10-17 20:19:44 +05:30
sunplus phy: sunplus: return negative error code in sp_usb_phy_probe 2023-11-27 18:39:18 +05:30
tegra Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
ti phy-for-6.13 2024-11-27 13:33:43 -08:00
xilinx phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30
Kconfig phy: add NXP PTN3222 eUSB2 to USB2 redriver 2024-10-17 20:48:27 +05:30
Makefile phy: add NXP PTN3222 eUSB2 to USB2 redriver 2024-10-17 20:48:27 +05:30
phy-airoha-pcie-regs.h phy: airoha: Fix REG_CSR_2L_RX{0,1}_REV0 definitions 2024-10-17 20:52:48 +05:30
phy-airoha-pcie.c phy: airoha: Fix REG_CSR_2L_JCPLL_SDM_HREN config in airoha_pcie_phy_init_ssc_jcpll() 2024-10-17 20:52:48 +05:30
phy-can-transceiver.c phy: phy-can-transceiver: insert space after include 2023-12-21 22:39:59 +05:30
phy-core-mipi-dphy.c phy: dphy: add support to calculate the timing based on hs_clk_rate 2022-10-27 14:38:04 +03:00
phy-core.c phy: core: Fix an OF node refcount leakage in _of_phy_get() 2024-12-24 19:55:37 +05:30
phy-lgm-usb.c phy: Switch back to struct platform_driver::remove() 2024-10-17 20:33:03 +05:30
phy-lpc18xx-usb-otg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
phy-nxp-ptn3222.c phy: add NXP PTN3222 eUSB2 to USB2 redriver 2024-10-17 20:48:27 +05:30
phy-pistachio-usb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
phy-xgene.c phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30