diff options
author | Naoko Tanibata <tnaoko@jp.adit-jv.com> | 2019-02-08 22:31:11 +0900 |
---|---|---|
committer | Naoko Tanibata <tnaoko@jp.adit-jv.com> | 2019-02-15 18:26:55 +0900 |
commit | 3f28f47c6d21a708d5ca1d8041a143fce23a574b (patch) | |
tree | b8ddf3a9d6b2fafd45262be5d434a4f9232eadd4 | |
parent | adf1ab215d4b8cef2ab4220e295b206ce7f14b10 (diff) |
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 <tnaoko@jp.adit-jv.com>
-rw-r--r-- | waltham-transmitter/transmitter-plugin/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |