[PATCH] drm/virtio: remove some redundant code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virtio_gpu_get_vbuf always be successful,
so remove the error judgment.

Signed-off-by: Su Hui <suhui@xxxxxxxxxxxx>
---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index b1a00c0c25a7..7a2680b3f1a7 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -129,10 +129,6 @@ virtio_gpu_alloc_cursor(struct virtio_gpu_device *vgdev,
 	vbuf = virtio_gpu_get_vbuf
 		(vgdev, sizeof(struct virtio_gpu_update_cursor),
 		 0, NULL, NULL);
-	if (IS_ERR(vbuf)) {
-		*vbuffer_p = NULL;
-		return ERR_CAST(vbuf);
-	}
 	*vbuffer_p = vbuf;
 	return (struct virtio_gpu_update_cursor *)vbuf->buf;
 }
-- 
2.30.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux