Skip to contentSkip to conversation

Input: cma3000-d0x - remove unneeded checks

PATCH New Dmitry Torokhov 1 participant 1 message Apr 12, 2012

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: cma3000-d0x - remove unneeded checks

data->mode is unsigned and can not be less than 0.

---
 drivers/input/misc/cma3000_d0x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/misc/cma3000_d0x.c +1 -1
index 06517e6..a3735a0 100644
@@ -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");
Signature · 5 lines
1.7.7.6


-- 
Dmitry