[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230711090030.692551-1-suhui@nfschina.com>
Date: Tue, 11 Jul 2023 17:00:31 +0800
From: Su Hui <suhui@...china.com>
To: airlied@...hat.com, kraxel@...hat.com, gurchetansingh@...omium.org,
olvaffe@...il.com, daniel@...ll.ch
Cc: dri-devel@...ts.freedesktop.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Su Hui <suhui@...china.com>
Subject: [PATCH] drm/virtio: remove some redundant code
virtio_gpu_get_vbuf always be successful,
so remove the error judgment.
Signed-off-by: Su Hui <suhui@...china.com>
---
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
Powered by blists - more mailing lists