From c085c8b6c1f8e95f6f4d91bc65268fe57154018c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 12 Feb 2013 12:58:08 +1000 Subject: 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 --- src/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3