- if (!(support & (1 << EV_KEY)))
- goto skip;
-
- ret = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits);
- if (ret == -1) {
- printf("in_evdev: ioctl failed on %s\n", name);
- goto skip;
- }
+ if (support & (1 << EV_KEY)) {
+ ret = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits);
+ if (ret == -1) {
+ printf("in_evdev: ioctl failed on %s\n", name);
+ goto skip;
+ }