diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2024-01-15 19:10:56 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2024-03-12 17:57:58 +0400 |
commit | cab47b210598c11b76053a01316df9835b94dc09 (patch) | |
tree | 2dcfe50cdaf36d7f49a462695c7c0c65434db2f7 | |
parent | fa88b85dea96ebad8d4380a3dee2a9e6e40c218c (diff) | |
download | qemu-cab47b210598c11b76053a01316df9835b94dc09.zip qemu-cab47b210598c11b76053a01316df9835b94dc09.tar.gz qemu-cab47b210598c11b76053a01316df9835b94dc09.tar.bz2 |
virtio-gpu: remove needless condition
qemu_create_displaysurface_pixman() never returns NULL.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r-- | hw/display/virtio-gpu.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 1c1ee23..ccbe31d 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 |