aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/vga
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2011-07-25 20:12:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 23:57:13 -0400
commitf35119d6681300ba6d76da53cb1ebc2eed62e77a (patch)
tree0dfd0d1bf9acf3e48791059b50bc68fff01c4db9 /drivers/gpu/vga
parentf1c93e4946ae1cc268729451de6335a7e7d2bea9 (diff)
drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: David Airlie <airlied@linux.ie> Cc: Tejun Heo <tj@kernel.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/vga')
-rw-r--r--drivers/gpu/vga/vgaarb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index 8a1021f2e319..c72f1c0b5e63 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -1171,10 +1171,9 @@ static int vga_arb_open(struct inode *inode, struct file *file)
1171 1171
1172 pr_debug("%s\n", __func__); 1172 pr_debug("%s\n", __func__);
1173 1173
1174 priv = kmalloc(sizeof(struct vga_arb_private), GFP_KERNEL); 1174 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
1175 if (priv == NULL) 1175 if (priv == NULL)
1176 return -ENOMEM; 1176 return -ENOMEM;
1177 memset(priv, 0, sizeof(*priv));
1178 spin_lock_init(&priv->lock); 1177 spin_lock_init(&priv->lock);
1179 file->private_data = priv; 1178 file->private_data = priv;
1180 1179