summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2016-04-18 14:47:14 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-04-19 09:24:21 -0700
commit5f7fb6f1e514e0ed47aee97752d6ae10491b4841 (patch)
treeab19d63d1e3def73bababf30888594abe18872c2 /drivers/input
parent52dee2c9f0850704327d976ea5c5fa7f4696dab5 (diff)
Input: twl6040-vibra - ignore return value of schedule_work
Returning ret is wrong. And checking for an error as well. User space may call multiple times until the work is really scheduled. twl4030-vibra.c also ignores the return value. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/twl6040-vibra.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index 3a196ada6892..0c853c2c57f8 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -212,11 +212,7 @@ static int vibra_play(struct input_dev *input, void *data,
info->strong_speed = effect->u.rumble.strong_magnitude;
info->direction = effect->direction < EFFECT_DIR_180_DEG ? 1 : -1;
- ret = schedule_work(&info->play_work);
- if (!ret) {
- dev_info(&input->dev, "work is already on queue\n");
- return ret;
- }
+ schedule_work(&info->play_work);
return 0;
}