usb: gadget: udc: renesas_usb3: remove redundant assignment to ret
authorColin Ian King <colin.king@canonical.com>
Wed, 26 Jun 2019 16:35:17 +0000 (17:35 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 3 Jul 2019 08:00:36 +0000 (11:00 +0300)
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")
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/renesas_usb3.c

index 5a960fc..87062d2 100644 (file)
@@ -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);