aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh/smu.c')
-rw-r--r--drivers/macintosh/smu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index f8e1a135bf9d..d409f6759482 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -1053,10 +1053,9 @@ static int smu_open(struct inode *inode, struct file *file)
1053 struct smu_private *pp; 1053 struct smu_private *pp;
1054 unsigned long flags; 1054 unsigned long flags;
1055 1055
1056 pp = kmalloc(sizeof(struct smu_private), GFP_KERNEL); 1056 pp = kzalloc(sizeof(struct smu_private), GFP_KERNEL);
1057 if (pp == 0) 1057 if (pp == 0)
1058 return -ENOMEM; 1058 return -ENOMEM;
1059 memset(pp, 0, sizeof(struct smu_private));
1060 spin_lock_init(&pp->lock); 1059 spin_lock_init(&pp->lock);
1061 pp->mode = smu_file_commands; 1060 pp->mode = smu_file_commands;
1062 init_waitqueue_head(&pp->wait); 1061 init_waitqueue_head(&pp->wait);