From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753542AbdJHSo0 (ORCPT ); Sun, 8 Oct 2017 14:44:26 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:47489 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753298AbdJHSoY (ORCPT ); Sun, 8 Oct 2017 14:44:24 -0400 X-Google-Smtp-Source: AOwi7QC/sJg4strLNV+6403vDHYrXYKVDO8/zu1bs2dRzuzSQPKBjLnJx8IyEYBG/gJ2lprLugCi2w== From: Christos Gkekas To: Nick Dyer , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] Input: atmel_mxt_ts - Remove unnecessary byte_offset check Date: Sun, 8 Oct 2017 19:44:18 +0100 Message-Id: <1507488258-22409-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable byte_offset is unsigned so checking whether it is greater or equal to zero is redundant. Signed-off-by: Christos Gkekas --- drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 7659bc4..baafaed 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -1356,7 +1356,7 @@ static int mxt_prepare_cfg_mem(struct mxt_data *data, byte_offset = reg + i - cfg_start_ofs; - if (byte_offset >= 0 && byte_offset < config_mem_size) { + if (byte_offset < config_mem_size) { *(config_mem + byte_offset) = val; } else { dev_err(dev, "Bad object: reg:%d, T%d, ofs=%d\n", -- 2.7.4