aboutsummaryrefslogtreecommitdiff
path: root/lib/pm-notifier-error-inject.c
diff options
context:
space:
mode:
authorZijun Hu <quic_zijuhu@quicinc.com>2024-12-13 20:36:44 +0800
committerVinod Koul <vkoul@kernel.org>2024-12-24 19:55:37 +0530
commit5ebdc6be16c2000e37fcb8b4072d442d268ad492 (patch)
tree5821a13c1a8888e3a3e805bed6ddedc315697437 /lib/pm-notifier-error-inject.c
parent4dc48c88fcf82b89fdebd83a906aaa64f40fb8a9 (diff)
downloadlinux-5ebdc6be16c2000e37fcb8b4072d442d268ad492.tar.gz
linux-5ebdc6be16c2000e37fcb8b4072d442d268ad492.tar.bz2
linux-5ebdc6be16c2000e37fcb8b4072d442d268ad492.zip
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: b7563e2796f8 ("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>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions