* [PATCH] USB: omap_udc: Remove unneeded variable
@ 2019-06-05 12:04 Hariprasad Kelam
0 siblings, 0 replies; only message in thread
From: Hariprasad Kelam @ 2019-06-05 12:04 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman, Aaro Koskinen, linux-usb,
linux-kernel
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>
---
drivers/usb/gadget/udc/omap_udc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c
index fcf13ef..f36f073 100644
--- a/drivers/usb/gadget/udc/omap_udc.c
+++ b/drivers/usb/gadget/udc/omap_udc.c
@@ -2103,7 +2103,6 @@ static int omap_udc_start(struct usb_gadget *g,
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;
}
/*-------------------------------------------------------------------------*/
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-05 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 12:04 [PATCH] USB: omap_udc: Remove unneeded variable Hariprasad Kelam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox