diff options
author | 2022-06-02 15:08:49 +0400 | |
---|---|---|
committer | 2022-06-10 11:21:55 +0200 | |
commit | b5c5b13cb45e2c88181308186b0001992cb41954 (patch) | |
tree | df24aec74d94fd6521f31a65dc36d7b0c8de6772 /drivers/usb/host | |
parent | usb: dwc3: add power down scale setting (diff) | |
download | linux-b5c5b13cb45e2c88181308186b0001992cb41954.tar.gz linux-b5c5b13cb45e2c88181308186b0001992cb41954.tar.bz2 linux-b5c5b13cb45e2c88181308186b0001992cb41954.zip |
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')
-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)) { |