From 3f28f47c6d21a708d5ca1d8041a143fce23a574b Mon Sep 17 00:00:00 2001 From: Naoko Tanibata Date: Fri, 8 Feb 2019 22:31:11 +0900 Subject: transmitter: Correct error handling When drm_get_dma_fd_from_view() fails, it returns negative value. Therefore output->renderer->dmafd shall be compared with a negative in error handling. Bug-AGL: SPEC-2057 Change-Id: I5457e7db8ff8673cdf32a65ff2c17721bfc8d7f0 Signed-off-by: Naoko Tanibata --- waltham-transmitter/transmitter-plugin/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waltham-transmitter/transmitter-plugin/output.c b/waltham-transmitter/transmitter-plugin/output.c index f5b1c21..ef6e972 100644 --- a/waltham-transmitter/transmitter-plugin/output.c +++ b/waltham-transmitter/transmitter-plugin/output.c @@ -193,7 +193,7 @@ transmitter_output_repaint(struct weston_output *base, output->renderer->dmafd = api->get_dma_fd_from_view(&output->base, view); - if(!output->renderer->dmafd) { + if(output->renderer->dmafd < 0) { weston_log("Failed to get dmafd\n"); goto out; } -- cgit 1.2.3-korg