]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/macintosh/smu.c
[POWERPC] Add missing of_node_put in drivers/macintosh/smu.c
[linux-2.6-omap-h63xx.git] / drivers / macintosh / smu.c
index 77ad192962c55acac9cba759471890a4538f5625..d86d57af282abde6bca52d369e480ca543651746 100644 (file)
@@ -483,12 +483,15 @@ int __init smu_init (void)
 
        if (smu_cmdbuf_abs == 0) {
                printk(KERN_ERR "SMU: Command buffer not allocated !\n");
+               of_node_put(np);
                return -EINVAL;
        }
 
        smu = alloc_bootmem(sizeof(struct smu_device));
-       if (smu == NULL)
+       if (smu == NULL) {
+               of_node_put(np);
                return -ENOMEM;
+       }
        memset(smu, 0, sizeof(*smu));
 
        spin_lock_init(&smu->lock);