提交 5f7fb6f1 编写于 作者: H H. Nikolaus Schaller 提交者: Dmitry Torokhov

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: NH. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 52dee2c9
...@@ -212,11 +212,7 @@ static int vibra_play(struct input_dev *input, void *data, ...@@ -212,11 +212,7 @@ static int vibra_play(struct input_dev *input, void *data,
info->strong_speed = effect->u.rumble.strong_magnitude; info->strong_speed = effect->u.rumble.strong_magnitude;
info->direction = effect->direction < EFFECT_DIR_180_DEG ? 1 : -1; info->direction = effect->direction < EFFECT_DIR_180_DEG ? 1 : -1;
ret = schedule_work(&info->play_work); schedule_work(&info->play_work);
if (!ret) {
dev_info(&input->dev, "work is already on queue\n");
return ret;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册