summaryrefslogtreecommitdiff
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-23 11:11:42 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-23 11:11:42 +0200
commitf34bfb1beef8a17ba3d46b60f8fa19ffedc1ed8d (patch)
tree0816c565d26ae24854616faa0d497be365c2fe8b /drivers/macintosh/smu.c
parentee4311adf105f4d740f52e3948acc1d81598afcc (diff)
parent481c5346d0981940ee63037eb53e4e37b0735c10 (diff)
Merge branch 'linus' into tracing/ftracetip-tracing-ftrace-2008-06-23_09.11_Mon
Diffstat (limited to 'drivers/macintosh/smu.c')
-rw-r--r--drivers/macintosh/smu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 77ad192962c5..d86d57af282a 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -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);