diff options
author | Hariprasad Kelam <hariprasad.kelam@gmail.com> | 2019-06-05 17:34:25 +0530 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-06-18 11:58:29 +0300 |
commit | 48f5e7493a6a0ac2cf6cf41835495a1f67f4a57c (patch) | |
tree | 73e5e67c13b5acc446ce6875debb0c726e4b86f0 /drivers/usb | |
parent | 811e5c3d3c4adf0b037fab3417395d3060a4492a (diff) |
USB: omap_udc: Remove unneeded variable
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/omap_udc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index fcf13ef33b31..f36f0730afab 100644 --- a/drivers/usb/gadget/udc/omap_udc.c +++ b/drivers/usb/gadget/udc/omap_udc.c @@ -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; } /*-------------------------------------------------------------------------*/ |