aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-02-12 12:58:08 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-02-12 13:19:49 +1000
commitc085c8b6c1f8e95f6f4d91bc65268fe57154018c (patch)
treee23977602feb4823e55040fa232d9a51f8c7e3d6
parentMake errors on EVIOCGBIT more obvious (diff)
downloadxf86-input-evdev-c085c8b6c1f8e95f6f4d91bc65268fe57154018c.tar.gz
xf86-input-evdev-c085c8b6c1f8e95f6f4d91bc65268fe57154018c.tar.bz2
xf86-input-evdev-c085c8b6c1f8e95f6f4d91bc65268fe57154018c.zip
Return BadValue if EvdevOpenMTDev fails
FALSE == Success, so if we fail during EvdevOpenMTDev, the caller thinks that everything worked fine, proceeds to set up the fd, etc. This may later cause a crash, when a device comes back later as different device and posts axis events where we didn't configure axes in the first place. Note: Unclear why there was no udev event received for the device being removed and coming back as different device though. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index ea2410b..052e9f0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2511,7 +2511,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
if (!EvdevOpenMTDev(pInfo)) {
xf86Msg(X_ERROR, "%s: Couldn't open mtdev device\n", pInfo->name);
EvdevCloseDevice(pInfo);
- return FALSE;
+ return BadValue;
}
#endif