drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible
[linux-2.6.git] / drivers / gpu / vga / vgaarb.c
index 8a1021f..c72f1c0 100644 (file)
@@ -1171,10 +1171,9 @@ static int vga_arb_open(struct inode *inode, struct file *file)
 
        pr_debug("%s\n", __func__);
 
-       priv = kmalloc(sizeof(struct vga_arb_private), GFP_KERNEL);
+       priv = kzalloc(sizeof(*priv), GFP_KERNEL);
        if (priv == NULL)
                return -ENOMEM;
-       memset(priv, 0, sizeof(*priv));
        spin_lock_init(&priv->lock);
        file->private_data = priv;