summaryrefslogtreecommitdiff
path: root/src/synaptics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/synaptics.c')
-rw-r--r--src/synaptics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 5fd5edc..282ced7 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -972,8 +972,10 @@ DeviceOn(DeviceIntPtr dev)
}
if (priv->proto_ops->DeviceOnHook &&
- !priv->proto_ops->DeviceOnHook(pInfo, &priv->synpara))
+ !priv->proto_ops->DeviceOnHook(pInfo, &priv->synpara)) {
+ xf86CloseSerial(pInfo->fd);
return !Success;
+ }
priv->comm.buffer = XisbNew(pInfo->fd, INPUT_BUFFER_SIZE);
if (!priv->comm.buffer) {