Input: aiptek - remove redundant assignment to variable ret
Subsystems (3)
PATCH 1/1 Input: aiptek - remove redundant assignment to variable ret
Variable ret is being assigned a value that is never read, it is being re-assigned again in either path of the if statement. The assignment is redundant and can be removed.
Cleans up clang scan build warning:
Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret' [deadcode.DeadStores]
--- drivers/input/tablet/aiptek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/tablet/aiptek.c +1 -2
@@ -931,8 +931,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data) }msleep (aiptek->curSetting.programmableDelay); -if ((ret = -aiptek_get_report (aiptek,3 ,2 , buf, sizeof_buf)) != sizeof_buf) { +if (aiptek_get_report (aiptek,3 ,2 , buf, sizeof_buf) != sizeof_buf) {dev_dbg (&aiptek->intf->dev,"aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n" , buf[0 ], buf[1 ], buf[2 ]);
Signature · 1 line
2.35.1
Quoted 9 lines · Colin Ian King
Variable ret is being assigned a value that is never read, it is being re-assigned again in either path of the if statement. The assignment is redundant and can be removed.
Cleans up clang scan build warning:
Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret' [deadcode.DeadStores]Signed-off-by Colin Ian King <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry