[PATCH 5/8] compositor-drm: Fix a return value check in drm_output_switch_mode()

Ander Conselvan de Oliveira conselvan2 at gmail.com
Fri Dec 14 07:37:27 PST 2012


From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>

gl_rederer_output_create() returns 0 on success, but drm compositor
would consider this a failure.
---
 src/compositor-drm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 3f2cd0c..22a3ac8 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1003,7 +1003,7 @@ drm_output_switch_mode(struct weston_output *output_base, struct weston_mode *mo
 
 	gl_renderer_output_destroy(&output->base);
 
-	if (!gl_renderer_output_create(&output->base, surface)) {
+	if (gl_renderer_output_create(&output->base, surface) < 0) {
 		weston_log("failed to create renderer output\n");
 		goto err_gbm;
 	}
-- 
1.7.9.5



More information about the wayland-devel mailing list