powerpc/gamecube/wii: delete unneeded test before of_node_put
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 8 Aug 2014 10:07:48 +0000 (12:07 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 9 Nov 2014 22:59:35 +0000 (09:59 +1100)
Simplify the error path to avoid calling of_node_put when it is not needed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c

index 20a8ed91962e9a0f851feb32caf25a44c1ff2d15..7feb325b636b87d97c238572e3fcf1f840eb5a2f 100644 (file)
@@ -247,7 +247,7 @@ void __init ug_udbg_init(void)
        np = of_find_compatible_node(NULL, NULL, "nintendo,flipper-exi");
        if (!np) {
                udbg_printf("%s: EXI node not found\n", __func__);
-               goto done;
+               goto out;
        }
 
        exi_io_base = ug_udbg_setup_exi_io_base(np);
@@ -267,8 +267,8 @@ void __init ug_udbg_init(void)
        }
 
 done:
-       if (np)
-               of_node_put(np);
+       of_node_put(np);
+out:
        return;
 }