Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
[pandora-kernel.git] / arch / powerpc / platforms / chrp / nvram.c
index ba3588f..d3ceff0 100644 (file)
@@ -74,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;