Commit 3ec35c45 authored by Dave Airlie's avatar Dave Airlie

xf86: actually set the compat output in the failure case

The previous fix for the previous fix, didn't fully work,

If we don't set compat_output we end up doing derferences
of arrays with -1, leading to valgrind warnings.
Reviewed-by: Chris Wilson's avatarChris Wilson <>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <>
Signed-off-by: default avatarDave Airlie <>
parent da8ee260
......@@ -1848,8 +1848,10 @@ SetCompatOutput(xf86CrtcConfigPtr config)
/* All outputs are disconnected, select one to fake */
if (!output && config->num_output)
output = config->output[0];
if (!output && config->num_output) {
config->compat_output = 0;
output = config->output[config->compat_output];
return output;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment