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

USB: misc: iowarrior: remove redundant assignment to variable io_res

The variable io_res is being assigned a value that is never read, it is
either being re-assigned a new value that is read later or it's not used
depending on the cases in the following switch statement. The assignment
is redundant and can be removed. Cleans up clang scan build warning:

drivers/usb/misc/iowarrior.c:504:2: warning: Value stored to 'io_res'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20231111202656.339103-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
f9cdf40e 98b1cc82

-1
-1
drivers/usb/misc/iowarrior.c
··· 501 501 dev->minor, cmd, arg); 502 502 503 503 retval = 0; 504 - io_res = 0; 505 504 switch (cmd) { 506 505 case IOW_WRITE: 507 506 if (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW24 ||