diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-02-12 12:58:08 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-02-12 13:19:49 +1000 |
commit | c085c8b6c1f8e95f6f4d91bc65268fe57154018c (patch) | |
tree | e23977602feb4823e55040fa232d9a51f8c7e3d6 | |
parent | 2b675f85aef6df3bb3fb5e68648982e11b752764 (diff) |
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.c | 2 |
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 |