Browse Source

Input: cma3000-d0x - remove unneeded checks

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>
Dmitry Torokhov 13 years ago
parent
commit
bcad87bd92
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/input/misc/cma3000_d0x.c

+ 1 - 1
drivers/input/misc/cma3000_d0x.c

@@ -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");