input: qcom-hv-haptics: correct pattern source checking logic

The pattern source check before loading predefined effect is incorrect.
Correct it.

Change-Id: I8026f6ee24ce17dfe43bc514eeb526300af99746
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
Fenglin Wu 2020-02-06 13:36:36 +08:00 committed by David Collins
parent 0460c5ea34
commit 9f3a5f2187

View File

@ -884,8 +884,8 @@ static int haptics_load_predefined_effect(struct haptics_chip *chip,
return rc;
play->pattern_src = play->effect->src;
if (play->pattern_src != PATTERN1 ||
play->pattern_src != PATTERN2 ||
if (play->pattern_src != PATTERN1 &&
play->pattern_src != PATTERN2 &&
play->pattern_src != FIFO) {
dev_err(chip->dev, "pattern src %d can't be used for predefined effect\n",
play->pattern_src);