Skip to content

Commit

Permalink
Input: cma3000-d0x - remove unneeded checks
Browse files Browse the repository at this point in the history
data->mode is unsigned and can not be less than 0.

Reported-by: Werner <w.landgraf@ru.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Apr 21, 2012
1 parent b83643e commit bcad87b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/misc/cma3000_d0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct cma3000_accl_data *cma3000_init(struct device *dev, int irq,
mutex_init(&data->mutex);

data->mode = pdata->mode;
if (data->mode < CMAMODE_DEFAULT || data->mode > CMAMODE_POFF) {
if (data->mode > CMAMODE_POFF) {
data->mode = CMAMODE_MOTDET;
dev_warn(dev,
"Invalid mode specified, assuming Motion Detect\n");
Expand Down

0 comments on commit bcad87b

Please sign in to comment.