[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/5] virtio-gpu: remove needless condition
From: |
marcandre . lureau |
Subject: |
[PULL 4/5] virtio-gpu: remove needless condition |
Date: |
Tue, 12 Mar 2024 18:02:15 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
qemu_create_displaysurface_pixman() never returns NULL.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
hw/display/virtio-gpu.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 1c1ee230b3..ccbe31d759 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -684,10 +684,6 @@ static void virtio_gpu_do_set_scanout(VirtIOGPU *g,
/* realloc the surface ptr */
scanout->ds = qemu_create_displaysurface_pixman(rect);
- if (!scanout->ds) {
- *error = VIRTIO_GPU_RESP_ERR_UNSPEC;
- return;
- }
#ifdef WIN32
qemu_displaysurface_win32_set_handle(scanout->ds, res->handle,
fb->offset);
#endif
@@ -1423,9 +1419,6 @@ static int virtio_gpu_post_load(void *opaque, int
version_id)
return -EINVAL;
}
scanout->ds = qemu_create_displaysurface_pixman(res->image);
- if (!scanout->ds) {
- return -EINVAL;
- }
#ifdef WIN32
qemu_displaysurface_win32_set_handle(scanout->ds, res->handle, 0);
#endif
--
2.44.0
- [PULL 0/5] UI patches, marcandre . lureau, 2024/03/12
- [PULL 1/5] ui/vnc: Respect bound console, marcandre . lureau, 2024/03/12
- [PULL 2/5] ui/dbus: factor out sending a scanout, marcandre . lureau, 2024/03/12
- [PULL 5/5] virtio-gpu: fix scanout migration post-load, marcandre . lureau, 2024/03/12
- [PULL 4/5] virtio-gpu: remove needless condition,
marcandre . lureau <=
- [PULL 3/5] ui/dbus: filter out pending messages when scanout, marcandre . lureau, 2024/03/12
- Re: [PULL 0/5] UI patches, Peter Maydell, 2024/03/12
- [PULL 0/5] Ui patches, marcandre . lureau, 2024/03/20
- [PULL 1/5] ui/vc: Do not inherit the size of active console, marcandre . lureau, 2024/03/20
- [PULL 2/5] ui/vnc: Do not use console_select(), marcandre . lureau, 2024/03/20
- [PULL 3/5] ui/cocoa: Do not use console_select(), marcandre . lureau, 2024/03/20
- [PULL 4/5] ui/curses: Do not use console_select(), marcandre . lureau, 2024/03/20
- [PULL 5/5] ui: compile dbus-display1.c with -fPIC as necessary, marcandre . lureau, 2024/03/20
- Re: [PULL 0/5] Ui patches, Peter Maydell, 2024/03/20