Skip to contentSkip to conversation

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

PATCH New Colin Ian King 1 participant 1 message Nov 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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]

---
 drivers/usb/misc/iowarrior.c | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/misc/iowarrior.c +0 -1
index 1e3df27bab58..6d28467ce352 100644
@@ -501,7 +501,6 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
 		dev->minor, cmd, arg);
 
 	retval = 0;
-	io_res = 0;
 	switch (cmd) {
 	case IOW_WRITE:
 		if (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW24 ||
Signature · 1 line
2.39.2