[PATCH] usb: storage: freecom: drop useless assignment in init_freecom()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In init_freecom(), the results of usb_stor_control_msg() calls are stored
in the local variable and then printed out by usb_stor_dbg() (if enabled),
except for the 1st call, the result of which is completely ignored.  Drop
the useless assignment.

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

---
This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo...

 drivers/usb/storage/freecom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: usb/drivers/usb/storage/freecom.c
===================================================================
--- usb.orig/drivers/usb/storage/freecom.c
+++ usb/drivers/usb/storage/freecom.c
@@ -446,7 +446,7 @@ static int init_freecom(struct us_data *
 	 * all our packets.  No need to allocate any extra buffer space.
 	 */
 
-	result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
+	usb_stor_control_msg(us, us->recv_ctrl_pipe,
 			0x4c, 0xc0, 0x4346, 0x0, buffer, 0x20, 3*HZ);
 	buffer[32] = '\0';
 	usb_stor_dbg(us, "String returned from FC init is: %s\n", buffer);




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux