Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fea1e0f authored by Sabyasachi Gupta's avatar Sabyasachi Gupta Committed by Gerd Hoffmann
Browse files

gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc

parent 6a37c49a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -78,10 +78,9 @@ virtio_gpu_get_vbuf(struct virtio_gpu_device *vgdev,
{
	struct virtio_gpu_vbuffer *vbuf;

	vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
	vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_KERNEL);
	if (!vbuf)
		return ERR_PTR(-ENOMEM);
	memset(vbuf, 0, VBUFFER_SIZE);

	BUG_ON(size > MAX_INLINE_CMD_SIZE);
	vbuf->buf = (void *)vbuf + sizeof(*vbuf);