return -EINVAL;
        }
 
-       list = kmalloc(sizeof(*list), GFP_KERNEL);
+       list = kzalloc(sizeof(*list), GFP_KERNEL);
        if (!list) {
                if (map->type == _DRM_REGISTERS)
                        iounmap(map->handle);
                kfree(map);
                return -EINVAL;
        }
-       memset(list, 0, sizeof(*list));
        list->map = map;
 
        mutex_lock(&dev->struct_mutex);
                return -EINVAL;
        }
 
-       entry->buflist = kmalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
+       entry->buflist = kzalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
        if (!entry->buflist) {
                mutex_unlock(&dev->struct_mutex);
                atomic_dec(&dev->buf_alloc);
                return -ENOMEM;
        }
-       memset(entry->buflist, 0, count * sizeof(*entry->buflist));
 
        entry->buf_size = size;
        entry->page_order = page_order;
                buf->file_priv = NULL;
 
                buf->dev_priv_size = dev->driver->dev_priv_size;
-               buf->dev_private = kmalloc(buf->dev_priv_size, GFP_KERNEL);
+               buf->dev_private = kzalloc(buf->dev_priv_size, GFP_KERNEL);
                if (!buf->dev_private) {
                        /* Set count correctly so we free the proper amount. */
                        entry->buf_count = count;
                        atomic_dec(&dev->buf_alloc);
                        return -ENOMEM;
                }
-               memset(buf->dev_private, 0, buf->dev_priv_size);
 
                DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
 
                return -EINVAL;
        }
 
-       entry->buflist = kmalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
+       entry->buflist = kzalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
        if (!entry->buflist) {
                mutex_unlock(&dev->struct_mutex);
                atomic_dec(&dev->buf_alloc);
                return -ENOMEM;
        }
-       memset(entry->buflist, 0, count * sizeof(*entry->buflist));
 
-       entry->seglist = kmalloc(count * sizeof(*entry->seglist), GFP_KERNEL);
+       entry->seglist = kzalloc(count * sizeof(*entry->seglist), GFP_KERNEL);
        if (!entry->seglist) {
                kfree(entry->buflist);
                mutex_unlock(&dev->struct_mutex);
                atomic_dec(&dev->buf_alloc);
                return -ENOMEM;
        }
-       memset(entry->seglist, 0, count * sizeof(*entry->seglist));
 
        /* Keep the original pagelist until we know all the allocations
         * have succeeded
                        buf->file_priv = NULL;
 
                        buf->dev_priv_size = dev->driver->dev_priv_size;
-                       buf->dev_private = kmalloc(buf->dev_priv_size,
-                                                 GFP_KERNEL);
+                       buf->dev_private = kzalloc(buf->dev_priv_size,
+                                               GFP_KERNEL);
                        if (!buf->dev_private) {
                                /* Set count correctly so we free the proper amount. */
                                entry->buf_count = count;
                                atomic_dec(&dev->buf_alloc);
                                return -ENOMEM;
                        }
-                       memset(buf->dev_private, 0, buf->dev_priv_size);
 
                        DRM_DEBUG("buffer %d @ %p\n",
                                  entry->buf_count, buf->address);
                return -EINVAL;
        }
 
-       entry->buflist = kmalloc(count * sizeof(*entry->buflist),
+       entry->buflist = kzalloc(count * sizeof(*entry->buflist),
                                GFP_KERNEL);
        if (!entry->buflist) {
                mutex_unlock(&dev->struct_mutex);
                atomic_dec(&dev->buf_alloc);
                return -ENOMEM;
        }
-       memset(entry->buflist, 0, count * sizeof(*entry->buflist));
 
        entry->buf_size = size;
        entry->page_order = page_order;
                buf->file_priv = NULL;
 
                buf->dev_priv_size = dev->driver->dev_priv_size;
-               buf->dev_private = kmalloc(buf->dev_priv_size, GFP_KERNEL);
+               buf->dev_private = kzalloc(buf->dev_priv_size, GFP_KERNEL);
                if (!buf->dev_private) {
                        /* Set count correctly so we free the proper amount. */
                        entry->buf_count = count;
                        return -ENOMEM;
                }
 
-               memset(buf->dev_private, 0, buf->dev_priv_size);
-
                DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
 
                offset += alignment;
                return -EINVAL;
        }
 
-       entry->buflist = kmalloc(count * sizeof(*entry->buflist),
+       entry->buflist = kzalloc(count * sizeof(*entry->buflist),
                                GFP_KERNEL);
        if (!entry->buflist) {
                mutex_unlock(&dev->struct_mutex);
                atomic_dec(&dev->buf_alloc);
                return -ENOMEM;
        }
-       memset(entry->buflist, 0, count * sizeof(*entry->buflist));
 
        entry->buf_size = size;
        entry->page_order = page_order;
                buf->file_priv = NULL;
 
                buf->dev_priv_size = dev->driver->dev_priv_size;
-               buf->dev_private = kmalloc(buf->dev_priv_size, GFP_KERNEL);
+               buf->dev_private = kzalloc(buf->dev_priv_size, GFP_KERNEL);
                if (!buf->dev_private) {
                        /* Set count correctly so we free the proper amount. */
                        entry->buf_count = count;
                        atomic_dec(&dev->buf_alloc);
                        return -ENOMEM;
                }
-               memset(buf->dev_private, 0, buf->dev_priv_size);
 
                DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);