summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-06-17 06:46:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-21 17:38:53 +0300
commit40a959d7042bb7711e404ad2318b30e9f92c6b9b (patch)
tree716f913a9914030369cb4c266050398b6d45ed45 /drivers/usb
parenta37599ebfb656c2af4ca119de556eba29b6926d6 (diff)
downloadlinux-40a959d7042bb7711e404ad2318b30e9f92c6b9b.tar.xz
usb: host: ohci-ppc-of: Fix refcount leak bug
In ohci_hcd_ppc_of_probe(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220617034637.4003115-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ohci-ppc-of.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 1960b8dfdba5..591f675cc930 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -166,6 +166,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
release_mem_region(res.start, 0x4);
} else
pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
+ of_node_put(np);
}
irq_dispose_mapping(irq);