Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4df2cb63 authored by Julia Lawall's avatar Julia Lawall Committed by Michael Ellerman
Browse files

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: c026c987 ("powerpc/83xx: Do not configure or probe disabled FSL DR USB controllers")
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: default avatarMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 0235854e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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"))) {