diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-05-09 14:30:50 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-05-10 11:05:00 +1000 |
commit | 2f1aedcaed8fd99b823d451bf1fb02330c078f67 (patch) | |
tree | 37790a2d1d286791bbdc11f0e99fbf3305870531 /xkb | |
parent | 8a88b0ab52ba375ae84463a90503db88af10e368 (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.c | 5 |
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; |