summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2019-02-23 14:20:34 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2019-04-20 22:02:27 +1000
commit4df2cb633b5b22ba152511f1a55e718efca6c0d9 (patch)
tree0a00af95ef473704f3d340dbb4a9387d0180d4d5 /arch/powerpc/platforms/83xx
parent0235854e1c25069d14512a35ea5cd05372e31fd6 (diff)
powerpc/83xx: Add missing of_node_put() after of_device_is_available()
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>
Diffstat (limited to 'arch/powerpc/platforms/83xx')
-rw-r--r--arch/powerpc/platforms/83xx/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 5c31d8292d3b..e7c2c3fb011a 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -221,8 +221,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"))) {