linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: udc: renesas_usb3: remove redundant assignment to ret
@ 2019-06-26 16:35 Colin King
  2019-06-27  1:15 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-06-26 16:35 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable ret is being initialized with a value that is never read and
ret is being re-assigned immediately after the initialization in both
paths of an if statement. This is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index 5a960fce31c5..87062d22134d 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -1168,7 +1168,7 @@ static void usb3_set_status_stage(struct renesas_usb3_ep *usb3_ep,
 static void usb3_p0_xfer(struct renesas_usb3_ep *usb3_ep,
 			 struct renesas_usb3_request *usb3_req)
 {
-	int ret = -EAGAIN;
+	int ret;
 
 	if (usb3_ep->dir_in)
 		ret = usb3_write_pipe(usb3_ep, usb3_req, USB3_P0_WRITE);
-- 
2.20.1


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

* RE: [PATCH] usb: gadget: udc: renesas_usb3: remove redundant assignment to ret
  2019-06-26 16:35 [PATCH] usb: gadget: udc: renesas_usb3: remove redundant assignment to ret Colin King
@ 2019-06-27  1:15 ` Yoshihiro Shimoda
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshihiro Shimoda @ 2019-06-27  1:15 UTC (permalink / raw)
  To: Colin King, Felipe Balbi, Greg Kroah-Hartman, linux-usb
  Cc: kernel-janitors, linux-kernel

Hi Colin,

> From: Colin King, Sent: Thursday, June 27, 2019 1:35 AM
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable ret is being initialized with a value that is never read and
> ret is being re-assigned immediately after the initialization in both
> paths of an if statement. This is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


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

end of thread, other threads:[~2019-06-27  1:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 16:35 [PATCH] usb: gadget: udc: renesas_usb3: remove redundant assignment to ret Colin King
2019-06-27  1:15 ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).