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

From: xiakaixu1987
Date: Mon Nov 23 2020 - 01:37:19 EST


From: Kaixu Xia <kaixuxia@xxxxxxxxxxx>

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@xxxxxxxxxxx>
Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
---
drivers/input/rmi4/rmi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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));
--
2.20.0