Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220418142457.84708-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Colin Ian King and committed by
Dmitry Torokhov
c8eefa0f 66ab05c7

+1 -2
+1 -2
drivers/input/tablet/aiptek.c
··· 931 931 } 932 932 msleep(aiptek->curSetting.programmableDelay); 933 933 934 - if ((ret = 935 - aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { 934 + if (aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf) != sizeof_buf) { 936 935 dev_dbg(&aiptek->intf->dev, 937 936 "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n", 938 937 buf[0], buf[1], buf[2]);