Skip to contentSkip to conversation

usb: storage: datafab: remove redundant assignment of variable result

PATCH In review Colin King 2 participants 2 messages Apr 20, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 usb: storage: datafab: remove redundant assignment of variable result

From: Colin Ian King <[email protected]>

The variable result is being assigned with a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/usb/storage/datafab.c | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/storage/datafab.c +0 -1
index 588818483f4b..bcc4a2fad863 100644
@@ -294,7 +294,6 @@ static int datafab_write_data(struct us_data *us,
 		if (reply[0] != 0x50 && reply[1] != 0) {
 			usb_stor_dbg(us, "Gah! write return code: %02x %02x\n",
 				     reply[0], reply[1]);
-			result = USB_STOR_TRANSPORT_ERROR;
 			goto leave;
 		}
 
Signature · 1 line
2.30.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Colin King

From: Colin Ian King <[email protected]>

The variable result is being assigned with a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---

Quoted 18 lines
 drivers/usb/storage/datafab.c | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/storage/datafab.c +0 -1
index 588818483f4b..bcc4a2fad863 100644
@@ -294,7 +294,6 @@ static int datafab_write_data(struct us_data *us,
 		if (reply[0] != 0x50 && reply[1] != 0) {
 			usb_stor_dbg(us, "Gah! write return code: %02x %02x\n",
 				     reply[0], reply[1]);
-			result = USB_STOR_TRANSPORT_ERROR;
 			goto leave;
 		}
 
Signature · 1 line
2.30.2