lkml.org 
[lkml]   [2020]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Input: synaptics-rmi4 - remove the useless unsigned variable compared with zero
Date
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 --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
\
 
 \ /
  Last update: 2020-11-23 07:38    [W:0.097 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site