[Xf86-video-armsoc] [PATCH 3/3] set_mode_major: Fix restoration of last good mode
Daniel Drake
drake at endlessm.com
Fri Nov 14 10:31:05 PST 2014
This check should be checking that we do have a last_good_mode
to restore. We then dereference this pointer a few lines below.
---
src/drmmode_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 81af4a0..771af0f 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -417,7 +417,7 @@ cleanup:
if (output_ids)
free(output_ids);
- if (!ret && !drmmode_crtc->last_good_mode) {
+ if (!ret && drmmode_crtc->last_good_mode) {
/* If there was a problem, restore the last good mode: */
crtc->x = drmmode_crtc->last_good_x;
crtc->y = drmmode_crtc->last_good_y;
--
1.8.1.2
More information about the Xf86-video-armsoc
mailing list