From bcad87bd92f4331d4422c1afd571e66f7f5c95d6 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 20 Apr 2012 22:33:09 -0700 Subject: [PATCH] Input: cma3000-d0x - remove unneeded checks data->mode is unsigned and can not be less than 0. Reported-by: Werner Signed-off-by: Dmitry Torokhov --- drivers/input/misc/cma3000_d0x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/cma3000_d0x.c b/drivers/input/misc/cma3000_d0x.c index 06517e60e50c..a3735a01e9fd 100644 --- a/drivers/input/misc/cma3000_d0x.c +++ b/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"); -- 2.39.5