[PATCH xserver] edid: use value returned from pruning duplicate modes

Jeff Smith whydoubt at gmail.com
Sat Jan 27 06:14:02 UTC 2018


xf86PruneDuplicateModes is passed a linked list of modes, and after
pruning the duplicate nodes, the new head of the list is returned.  If
the first element is removed, the head of the list will change and the
returned value needs to be assigned.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103722
Thanks: John Lumby <johnlumby at hotmail.com>
Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
 hw/xfree86/modes/xf86EdidModes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index ff04eca03..24fac4f2a 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -1201,7 +1201,7 @@ xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
             Monitor->Modes = Modes;
         }
 
-        xf86PruneDuplicateModes(Monitor->Modes);
+        Monitor->Modes = xf86PruneDuplicateModes(Monitor->Modes);
 
         /* Update pointer to last mode */
         for (Mode = Monitor->Modes; Mode && Mode->next; Mode = Mode->next) {}
-- 
2.14.3



More information about the xorg-devel mailing list