summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wcmValidateDevice.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 9c0294b..cc0b807 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -310,10 +310,11 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo)
#ifdef INPUT_PROP_DIRECT
{
+ int rc;
unsigned long prop[NBITS(INPUT_PROP_MAX)] = {0};
- ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), prop);
- if (ISBITSET(prop, INPUT_PROP_DIRECT))
+ rc = ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), prop);
+ if (rc >= 0 && ISBITSET(prop, INPUT_PROP_DIRECT))
TabletSetFeature(priv->common, WCM_LCD);
}
#endif