diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-03-09 11:10:33 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-21 19:20:28 +0200 |
commit | 424bef51fa530389b0b9008c9e144e40c10e8458 (patch) | |
tree | 011dd5749c3041d739ab82213f60950b4e14b72a /drivers/usb/musb | |
parent | 7e824f28c9d7275471aa98509a7e3c8369fae379 (diff) | |
download | linux-424bef51fa530389b0b9008c9e144e40c10e8458.tar.bz2 |
usb: musb: Fix missing of_node_put() in omap2430_probe
The device_node pointer is returned by of_parse_phandle() with refcount
incremented. We should use of_node_put() on it when done.
Fixes: 8934d3e4d0e7 ("usb: musb: omap2430: Don't use omap_get_control_dev()")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220309111033.24487-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index d2b7e613eb34..f571a65ae6ee 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -362,6 +362,7 @@ static int omap2430_probe(struct platform_device *pdev) control_node = of_parse_phandle(np, "ctrl-module", 0); if (control_node) { control_pdev = of_find_device_by_node(control_node); + of_node_put(control_node); if (!control_pdev) { dev_err(&pdev->dev, "Failed to get control device\n"); ret = -EINVAL; |