mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/virtio: remove some redundant code
@ 2023-07-11  9:00 Su Hui
  2023-07-11 11:13 ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Su Hui @ 2023-07-11  9:00 UTC (permalink / raw)
  To: airlied, kraxel, gurchetansingh, olvaffe, daniel
  Cc: dri-devel, virtualization, linux-kernel, kernel-janitors, Su Hui

virtio_gpu_get_vbuf always be successful,
so remove the error judgment.

Signed-off-by: Su Hui <suhui@nfschina.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


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <6baf8384-af7a-06e1-6f91-8c4e8aa65197@web.de>]

end of thread, other threads:[~2023-07-12 10:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11  9:00 [PATCH] drm/virtio: remove some redundant code Su Hui
2023-07-11 11:13 ` Dan Carpenter
2023-07-12  1:18   ` Su Hui
2023-07-12  6:36     ` Dan Carpenter
2023-07-12 10:15       ` Su Hui
     [not found] <6baf8384-af7a-06e1-6f91-8c4e8aa65197@web.de>
2023-07-12  1:26 ` Su Hui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®