diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/smu.c | 5 |
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) | |||
483 | 483 | ||
484 | if (smu_cmdbuf_abs == 0) { | 484 | if (smu_cmdbuf_abs == 0) { |
485 | printk(KERN_ERR "SMU: Command buffer not allocated !\n"); | 485 | printk(KERN_ERR "SMU: Command buffer not allocated !\n"); |
486 | of_node_put(np); | ||
486 | return -EINVAL; | 487 | return -EINVAL; |
487 | } | 488 | } |
488 | 489 | ||
489 | smu = alloc_bootmem(sizeof(struct smu_device)); | 490 | smu = alloc_bootmem(sizeof(struct smu_device)); |
490 | if (smu == NULL) | 491 | if (smu == NULL) { |
492 | of_node_put(np); | ||
491 | return -ENOMEM; | 493 | return -ENOMEM; |
494 | } | ||
492 | memset(smu, 0, sizeof(*smu)); | 495 | memset(smu, 0, sizeof(*smu)); |
493 | 496 | ||
494 | spin_lock_init(&smu->lock); | 497 | spin_lock_init(&smu->lock); |