[PATCH 05/10] powerpc: Fix unbalanced of_node_{get, put} in efika-setup.c

Sylvain Munaut tnt at 246tNt.com
Tue Feb 13 09:13:23 EST 2007


Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
Acked-by: Grant Likely <grant.likely at secretlab.ca>
---
 arch/powerpc/platforms/52xx/efika-setup.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c
index d61ce84..b6945cb 100644
--- a/arch/powerpc/platforms/52xx/efika-setup.c
+++ b/arch/powerpc/platforms/52xx/efika-setup.c
@@ -42,14 +42,13 @@ static void efika_show_cpuinfo(struct se
 	const char *codegenvendor = NULL;
 
 	root = of_find_node_by_path("/");
-	if (root) {
-		revision = get_property(root, "revision", NULL);
-		codegendescription =
-		    get_property(root, "CODEGEN,description", NULL);
-		codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
+	if (!root)
+		return;
 
-		of_node_put(root);
-	}
+	revision = get_property(root, "revision", NULL);
+	codegendescription =
+		    get_property(root, "CODEGEN,description", NULL);
+	codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
 
 	if (codegendescription)
 		seq_printf(m, "machine\t\t: %s\n", codegendescription);
-- 
1.4.2




More information about the Linuxppc-dev mailing list