summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/input/misc/uinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/input/misc/uinput.c')
-rw-r--r--kernel/drivers/input/misc/uinput.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/drivers/input/misc/uinput.c b/kernel/drivers/input/misc/uinput.c
index 421e29e4c..5adbcedcb 100644
--- a/kernel/drivers/input/misc/uinput.c
+++ b/kernel/drivers/input/misc/uinput.c
@@ -320,10 +320,8 @@ static int uinput_validate_absbits(struct input_dev *dev)
* Check if absmin/absmax/absfuzz/absflat are sane.
*/
- for (cnt = 0; cnt < ABS_CNT; cnt++) {
+ for_each_set_bit(cnt, dev->absbit, ABS_CNT) {
int min, max;
- if (!test_bit(cnt, dev->absbit))
- continue;
min = input_abs_get_min(dev, cnt);
max = input_abs_get_max(dev, cnt);