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 <chris@chris-wilson.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
da8ee26023
commit
3ec35c45ca
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue