diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-02 11:37:17 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-02 11:37:17 +0100 |
commit | baef2201f752da5d0c6322547d925fcbd86c6de4 (patch) | |
tree | 26f1adfa30847954a586f822396ff220a8063d85 | |
parent | f98b2e164637292c2425f6e6d2c22bd9a2800f8e (diff) |
sna: Silence compiler warning
Simplify the dependency logic so that even the compiler can understand
what is going on.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 8657dabf..c27694a2 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3362,7 +3362,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y) for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; struct sna_crtc *sna_crtc = to_sna_crtc(crtc); - struct sna_cursor *cursor; + struct sna_cursor *cursor = NULL; struct drm_mode_cursor arg; if (!sna_crtc) @@ -3405,9 +3405,9 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y) goto disable; } - arg.handle = cursor->handle; if (sna_crtc->cursor != cursor) { arg.flags |= DRM_MODE_CURSOR_BO; + arg.handle = cursor->handle; arg.width = arg.height = cursor->size; } @@ -3427,7 +3427,7 @@ disable: if (arg.flags && drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_CURSOR, &arg) == 0) - sna_crtc->cursor = arg.handle ? cursor : NULL; + sna_crtc->cursor = cursor; } OsReleaseSIGIO(); } |