Commit da8ee260 authored by Dave Airlie's avatar Dave Airlie

xfree86/hotplug: cleanup properly if the screen fails to initialise

Due to another bug, the modesetting/udl driver would fail to init properly
on hotplug, when it did the code didn't clean up properly, and on removing
the device the server could crash.

Found in F18 testing.
Signed-off-by: default avatarDave Airlie <>
Reviewed-by: Aaron Plattner's avatarAaron Plattner <>
parent 90642948
......@@ -438,7 +438,12 @@ xf86platformAddDevice(int index)
scr_index = AddGPUScreen(xf86GPUScreens[i]->ScreenInit, 0, NULL);
if (scr_index == -1) {
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
xf86NumGPUScreens = old_screens;
return -1;
xf86ScreenKey, xf86GPUScreens[i]);
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