[POWERPC] Fix unbalanced of_node_{get,put} in efika-setup.c
authorSylvain Munaut <tnt@246tNt.com>
Mon, 12 Feb 2007 22:13:23 +0000 (23:13 +0100)
committerPaul Mackerras <paulus@samba.org>
Tue, 13 Feb 2007 04:35:53 +0000 (15:35 +1100)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/52xx/efika-setup.c

index d61ce84e201f8f2f4990e21c5724fad9356320a6..b6945cbbfba62a096cf37363b0a103c194ed67ee 100644 (file)
@@ -42,14 +42,13 @@ static void efika_show_cpuinfo(struct seq_file *m)
        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);