USB: omap_udc: Remove unneeded variable
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Wed, 5 Jun 2019 12:04:25 +0000 (17:34 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 18 Jun 2019 08:58:29 +0000 (11:58 +0300)
With the current implementation omap_udc_stop is always
returning -ENODEV.

Added changes to return 0 and remove variable status.

Issue identified with coccicheck
drivers/usb/gadget/udc/omap_udc.c:2106:6-12:
Unneeded variable: "status". Return "- ENODEV" on line 2128

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/omap_udc.c

index fcf13ef..f36f073 100644 (file)
@@ -2103,7 +2103,6 @@ done:
 static int omap_udc_stop(struct usb_gadget *g)
 {
        unsigned long   flags;
-       int             status = -ENODEV;
 
        if (udc->dc_clk != NULL)
                omap_udc_enable_clock(1);
@@ -2125,7 +2124,7 @@ static int omap_udc_stop(struct usb_gadget *g)
        if (udc->dc_clk != NULL)
                omap_udc_enable_clock(0);
 
-       return status;
+       return 0;
 }
 
 /*-------------------------------------------------------------------------*/