drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible
[linux-2.6.git] / drivers / gpu / drm / vmwgfx / vmwgfx_overlay.c
index f1a52f9..07ce02d 100644 (file)
@@ -585,11 +585,10 @@ int vmw_overlay_init(struct vmw_private *dev_priv)
                return -ENOSYS;
        }
 
-       overlay = kmalloc(sizeof(*overlay), GFP_KERNEL);
+       overlay = kzalloc(sizeof(*overlay), GFP_KERNEL);
        if (!overlay)
                return -ENOMEM;
 
-       memset(overlay, 0, sizeof(*overlay));
        mutex_init(&overlay->mutex);
        for (i = 0; i < VMW_MAX_NUM_STREAMS; i++) {
                overlay->stream[i].buf = NULL;