diff mbox series

Input: atmel_mxt_ts: remove meaningless checking

Message ID 20200505090930.183748-1-xiexiuqi@huawei.com (mailing list archive)
State New
Headers show
Series Input: atmel_mxt_ts: remove meaningless checking | expand

Commit Message

Xie XiuQi May 5, 2020, 9:09 a.m. UTC
byte_offset is unsigned integer, it's always >= 0, so remove this
meaningless checking.

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index ae60442efda0..1bd072c5a49d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1368,7 +1368,7 @@  static int mxt_prepare_cfg_mem(struct mxt_data *data, struct mxt_cfg *cfg)
 
 			byte_offset = reg + i - cfg->start_ofs;
 
-			if (byte_offset >= 0 && byte_offset < cfg->mem_size) {
+			if (byte_offset < cfg->mem_size) {
 				*(cfg->mem + byte_offset) = val;
 			} else {
 				dev_err(dev, "Bad object: reg:%d, T%d, ofs=%d\n",