Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[pandora-kernel.git] / arch / powerpc / platforms / chrp / nvram.c
index 8efd424..d3ceff0 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <asm/prom.h>
@@ -75,8 +74,10 @@ void __init chrp_nvram_init(void)
                return;
 
        nbytes_p = of_get_property(nvram, "#bytes", &proplen);
-       if (nbytes_p == NULL || proplen != sizeof(unsigned int))
+       if (nbytes_p == NULL || proplen != sizeof(unsigned int)) {
+               of_node_put(nvram);
                return;
+       }
 
        nvram_size = *nbytes_p;