diff options
author | Keith Packard <keithp@keithp.com> | 2014-02-22 01:44:37 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-02-24 08:11:04 +1000 |
commit | c189854a688465c820d5ef5767e00b69394a1601 (patch) | |
tree | 3ee92e74c67c0b5aebd47975698d02fccf432707 | |
parent | 503082bf17dfc4cb3d4b794ea514ac6f413c07f2 (diff) |
Close device if DeviceOnHook fails
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 22fe8bdc6668e78853768c62f4d1331114c7eca0)
-rw-r--r-- | src/synaptics.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index 1c22873..0986e20 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -959,8 +959,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) { |