diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2019-02-23 14:20:34 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-09-23 21:11:45 +0100 |
commit | 2954ef4859feb37fd568a36e09cf93032299f4a1 (patch) | |
tree | 8c684b21b7f7c11829e91512c49af280b56527b1 /arch | |
parent | a43eca8aa889570f24bf48f87a719000726d6858 (diff) | |
download | linux-stable-2954ef4859feb37fd568a36e09cf93032299f4a1.tar.gz linux-stable-2954ef4859feb37fd568a36e09cf93032299f4a1.tar.bz2 linux-stable-2954ef4859feb37fd568a36e09cf93032299f4a1.zip |
powerpc/83xx: Add missing of_node_put() after of_device_is_available()
commit 4df2cb633b5b22ba152511f1a55e718efca6c0d9 upstream.
Add an of_node_put() when a tested device node is not available.
Fixes: c026c98739c7e ("powerpc/83xx: Do not configure or probe disabled FSL DR USB controllers")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/83xx/usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index 1ad748bb39b4..7eb4e4c3b980 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c @@ -222,8 +222,10 @@ int mpc837x_usb_cfg(void) int ret = 0; np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); - if (!np || !of_device_is_available(np)) + if (!np || !of_device_is_available(np)) { + of_node_put(np); return -ENODEV; + } prop = of_get_property(np, "phy_type", NULL); if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) { |