From: Sylvain Munaut Date: Mon, 12 Feb 2007 22:13:23 +0000 (+0100) Subject: [POWERPC] Fix unbalanced of_node_{get,put} in efika-setup.c X-Git-Tag: v2.6.21-rc1~273^2~3^2~10^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=46e4cf6c14e0a5b8916a1236a7079ccad3f4352a;p=linux-2.6-omap-h63xx.git [POWERPC] Fix unbalanced of_node_{get,put} in efika-setup.c Signed-off-by: Sylvain Munaut Acked-by: Grant Likely Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c index d61ce84e201..b6945cbbfba 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 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);