[PATCH 2/7] dix: return early from DisableDevice if the device is already disabled
Peter Hutterer
peter.hutterer at who-t.net
Tue May 15 03:36:24 PDT 2012
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/devices.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dix/devices.c b/dix/devices.c
index 0755cd7..2be8bf1 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -428,6 +428,9 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
BOOL enabled;
int flags[MAXDEVICES] = { 0 };
+ if (!dev->enabled)
+ return TRUE;
+
for (prev = &inputInfo.devices;
*prev && (*prev != dev); prev = &(*prev)->next);
if (*prev != dev)
--
1.7.10.1
More information about the xorg-devel
mailing list