summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-09 14:30:50 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-10 11:05:00 +1000
commit2f1aedcaed8fd99b823d451bf1fb02330c078f67 (patch)
tree37790a2d1d286791bbdc11f0e99fbf3305870531 /xkb
parent8a88b0ab52ba375ae84463a90503db88af10e368 (diff)
input: print warnings if drivers don't initialize properly
If drivers supply incorrect values don't just quietly return False, spew to the log so we can detect what's going on. All these cases are driver bugs and should be fixed immediately. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbInit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 573c4ff1d..5308a29df 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -503,8 +503,9 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
XkbEventCauseRec cause;
XkbRMLVOSet rmlvo_dflts = { NULL };
- if (dev->key || dev->kbdfeed)
- return FALSE;
+ BUG_RETURN_VAL(dev == NULL, FALSE);
+ BUG_RETURN_VAL(dev->key != NULL, FALSE);
+ BUG_RETURN_VAL(dev->kbdfeed != NULL, FALSE);
if (!rmlvo) {
rmlvo = &rmlvo_dflts;