[PATCH synaptics] After closing the fd, reset it to -1.

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 16 20:56:15 PDT 2010


A DeviceOff() followed by DeviceClose() (which calls DeviceOff()) would try
to close the fd twice, in addition to calling various hooks.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/synaptics.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index ad2397f..f9db81c 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -842,6 +842,7 @@ DeviceOff(DeviceIntPtr dev)
 	    priv->comm.buffer = NULL;
 	}
 	xf86CloseSerial(local->fd);
+	local->fd = -1;
     }
     dev->public.on = FALSE;
     return Success;
-- 
1.6.6.1



More information about the xorg-devel mailing list