aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-07-14 17:29:34 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-14 17:29:34 -0400
commit2fceef397f9880b212a74c418290ce69e7ac00eb (patch)
treed9cc09ab992825ef7fede4a688103503e3caf655 /drivers/macintosh/smu.c
parentfeae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff)
parentbce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff)
Merge commit 'v2.6.26' into bkl-removal
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 b82fcd210bf3..32cb0298f88e 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -484,12 +484,15 @@ int __init smu_init (void)
484 484
485 if (smu_cmdbuf_abs == 0) { 485 if (smu_cmdbuf_abs == 0) {
486 printk(KERN_ERR "SMU: Command buffer not allocated !\n"); 486 printk(KERN_ERR "SMU: Command buffer not allocated !\n");
487 of_node_put(np);
487 return -EINVAL; 488 return -EINVAL;
488 } 489 }
489 490
490 smu = alloc_bootmem(sizeof(struct smu_device)); 491 smu = alloc_bootmem(sizeof(struct smu_device));
491 if (smu == NULL) 492 if (smu == NULL) {
493 of_node_put(np);
492 return -ENOMEM; 494 return -ENOMEM;
495 }
493 memset(smu, 0, sizeof(*smu)); 496 memset(smu, 0, sizeof(*smu));
494 497
495 spin_lock_init(&smu->lock); 498 spin_lock_init(&smu->lock);