Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/gamecube/wii: delete unneeded test before of_node_put

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>

authored by

Julia Lawall and committed by
Michael Ellerman
6609ed14 498b6514

+3 -3
+3 -3
arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
··· 247 247 np = of_find_compatible_node(NULL, NULL, "nintendo,flipper-exi"); 248 248 if (!np) { 249 249 udbg_printf("%s: EXI node not found\n", __func__); 250 - goto done; 250 + goto out; 251 251 } 252 252 253 253 exi_io_base = ug_udbg_setup_exi_io_base(np); ··· 267 267 } 268 268 269 269 done: 270 - if (np) 271 - of_node_put(np); 270 + of_node_put(np); 271 + out: 272 272 return; 273 273 } 274 274