diff mbox series

[10/67] ui/console: new_console() cannot fail

Message ID 20230830093843.3531473-11-marcandre.lureau@redhat.com
State New
Headers show
Series Make pixman an optional dependency | expand

Commit Message

Marc-André Lureau Aug. 30, 2023, 9:37 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

There is no code path that could allow a NULL return there.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/console.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Daniel P. Berrangé Aug. 30, 2023, 11:07 a.m. UTC | #1
On Wed, Aug 30, 2023 at 01:37:44PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> There is no code path that could allow a NULL return there.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/console.c | 5 -----
>  1 file changed, 5 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

With regards,
Daniel
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index ba79c735b7..8c4626f255 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2481,11 +2481,6 @@  static void vc_chr_open(Chardev *chr,
         s->surface = qemu_create_displaysurface(width, height);
     }
 
-    if (!s) {
-        error_setg(errp, "cannot create text console");
-        return;
-    }
-
     s->chr = chr;
     drv->console = s;