]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: chipidea: udc: remove redundant assignment to variable retval
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Jul 2019 15:03:41 +0000 (16:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2019 09:10:55 +0000 (11:10 +0200)
The variable retval is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.  Also remove a blank
line.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190704150341.759-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c

index 6a5ee8e6da10574ce9cb96e1bf082e8751a8aac7..053432d79bf7cfcd9f82fd75f1e3c3ca254aaa90 100644 (file)
@@ -1746,12 +1746,11 @@ static int ci_udc_start(struct usb_gadget *gadget,
                         struct usb_gadget_driver *driver)
 {
        struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget);
-       int retval = -ENOMEM;
+       int retval;
 
        if (driver->disconnect == NULL)
                return -EINVAL;
 
-
        ci->ep0out->ep.desc = &ctrl_endpt_out_desc;
        retval = usb_ep_enable(&ci->ep0out->ep);
        if (retval)