diff mbox series

Input: synaptics-rmi4 - remove the useless unsigned variable compared with zero

Message ID 1606113428-21462-1-git-send-email-kaixuxia@tencent.com (mailing list archive)
State New
Headers show
Series Input: synaptics-rmi4 - remove the useless unsigned variable compared with zero | expand

Commit Message

kaixuxia Nov. 23, 2020, 6:37 a.m. UTC
From: Kaixu Xia <kaixuxia@tencent.com>

It is always true that the value of unsigned variable size_presence_reg
greater than or equal to zero, so compared with zero is unnecessary.
Remove it.

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 drivers/input/rmi4/rmi_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 258d5fe3d395..e7c9300417e3 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -580,7 +580,7 @@  int rmi_read_register_desc(struct rmi_device *d, u16 addr,
 		return ret;
 	++addr;
 
-	if (size_presence_reg < 0 || size_presence_reg > 35)
+	if (size_presence_reg > 35)
 		return -EIO;
 
 	memset(buf, 0, sizeof(buf));