diff options
-rw-r--r-- | drivers/input/joydev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index abd18f31b24f..5298a762b615 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -87,7 +87,7 @@ static int joydev_correct(int value, struct js_corr *corr) return 0; } - return value < -32767 ? -32767 : (value > 32767 ? 32767 : value); + return clamp(value, -32767, 32767); } static void joydev_pass_event(struct joydev_client *client, |