All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: storage: freecom: drop useless assignment in init_freecom()
@ 2023-11-29 20:43 Sergey Shtylyov
  2023-12-04  7:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Shtylyov @ 2023-11-29 20:43 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman, linux-usb, usb-storage

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@omp.ru>

---
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);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-22 18:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 20:43 [PATCH] usb: storage: freecom: drop useless assignment in init_freecom() Sergey Shtylyov
2023-12-04  7:04 ` Greg Kroah-Hartman
2023-12-07 16:16   ` Sergey Shtylyov
2024-01-22 18:26     ` Sergey Shtylyov
2024-01-22 18:53       ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.