diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-06-02 14:08:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-10 12:21:55 +0300 |
commit | b5c5b13cb45e2c88181308186b0001992cb41954 (patch) | |
tree | df24aec74d94fd6521f31a65dc36d7b0c8de6772 /drivers/usb/host/ehci-ppc-of.c | |
parent | 3497b9a5c8c3d4efaa15ab542cc6a774b0e0a7c6 (diff) | |
download | linux-b5c5b13cb45e2c88181308186b0001992cb41954.tar.xz |
usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe
of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.
Fixes: 796bcae7361c ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]")
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220602110849.58549-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-ppc-of.c')
-rw-r--r-- | drivers/usb/host/ehci-ppc-of.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 6bbaee74f7e7..28a19693c19f 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c @@ -148,6 +148,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op) } else { ehci->has_amcc_usb23 = 1; } + of_node_put(np); } if (of_get_property(dn, "big-endian", NULL)) { |