From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/6] egl-helpers: add missing error check
Date: Fri, 5 May 2017 12:40:59 +0200 [thread overview]
Message-ID: <20170505104101.30589-5-kraxel@redhat.com> (raw)
In-Reply-To: <20170505104101.30589-1-kraxel@redhat.com>
Code didn't check for qemu_egl_init_dpy_mesa() failures, add it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/egl-helpers.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index ec2e325e21..b50225158b 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -80,6 +80,7 @@ static int qemu_egl_rendernode_open(const char *rendernode)
int egl_rendernode_init(const char *rendernode)
{
qemu_egl_rn_fd = -1;
+ int rc;
qemu_egl_rn_fd = qemu_egl_rendernode_open(rendernode);
if (qemu_egl_rn_fd == -1) {
@@ -93,7 +94,11 @@ int egl_rendernode_init(const char *rendernode)
goto err;
}
- qemu_egl_init_dpy_mesa((EGLNativeDisplayType)qemu_egl_rn_gbm_dev);
+ rc = qemu_egl_init_dpy_mesa((EGLNativeDisplayType)qemu_egl_rn_gbm_dev);
+ if (rc != 0) {
+ /* qemu_egl_init_dpy_mesa reports error */
+ goto err;
+ }
if (!epoxy_has_egl_extension(qemu_egl_display,
"EGL_KHR_surfaceless_context")) {
--
2.9.3
next prev parent reply other threads:[~2017-05-05 10:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 10:40 [Qemu-devel] [PATCH 0/6] opengl: add headless ui, misc fixes Gerd Hoffmann
2017-05-05 10:40 ` [Qemu-devel] [PATCH 1/6] virtio-gpu: move virtio_gpu_gl_block Gerd Hoffmann
2017-05-05 11:47 ` Philippe Mathieu-Daudé
2017-05-05 11:57 ` Marc-André Lureau
2017-05-05 10:40 ` [Qemu-devel] [PATCH 2/6] egl-helpers: drop support for gles and debug logging Gerd Hoffmann
2017-05-05 11:47 ` Philippe Mathieu-Daudé
2017-05-05 11:58 ` Marc-André Lureau
2017-05-05 10:40 ` [Qemu-devel] [PATCH 3/6] egl-helpers: fix display init for x11 Gerd Hoffmann
2017-05-05 10:40 ` Gerd Hoffmann [this message]
2017-05-05 11:48 ` [Qemu-devel] [PATCH 4/6] egl-helpers: add missing error check Philippe Mathieu-Daudé
2017-05-05 10:41 ` [Qemu-devel] [PATCH 5/6] egl: explicitly ask for core context Gerd Hoffmann
2017-05-05 10:41 ` [Qemu-devel] [PATCH 6/6] opengl: add egl-headless display Gerd Hoffmann
2017-05-17 7:56 ` [Qemu-devel] QEMU master is broken (was: [PATCH 6/6] opengl: add egl-headless display) Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170505104101.30589-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).