linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: gtco: remove unnecessary variable assignments
@ 2017-06-15  1:50 Gustavo A. R. Silva
  2017-06-15  5:00 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-15  1:50 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Gustavo A. R. Silva

Remove unnecessary variable assignments.
Variable _val_ is overwritten before the value stored in it can be used.

Addresses-Coverity-ID: 1397695
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/input/tablet/gtco.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index b796e89..d9de13c 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -652,8 +652,6 @@ static void gtco_urb_callback(struct urb *urbinfo)
 		switch (device->buffer[0]) {
 		case 5:
 			/* Pressure is 9 bits */
-			val = ((u16)(device->buffer[8]) << 1);
-			val |= (u16)(device->buffer[7] >> 7);
 			input_report_abs(inputdev, ABS_PRESSURE,
 					 device->buffer[8]);
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-15 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15  1:50 [PATCH] USB: gtco: remove unnecessary variable assignments Gustavo A. R. Silva
2017-06-15  5:00 ` Joe Perches
2017-06-15 19:25   ` ulrik.debie-os

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).