diff mbox series

drivers: musb: removed unused status variable

Message ID 20191002173913.12847-1-aliasgar.surti500@gmail.com (mailing list archive)
State Mainlined
Commit 29e56c0cf5d910a07b9932cf5924ade9d98a8143
Headers show
Series drivers: musb: removed unused status variable | expand

Commit Message

Aliasgar Surti Oct. 2, 2019, 5:39 p.m. UTC
From: Aliasgar Surti <aliasgar.surti500@gmail.com>

Status variable is initialized and returned without updating it's value.
Removed status variable and returned value directly.

Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
---
 drivers/usb/musb/musb_gadget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Greg KH Oct. 4, 2019, 12:11 p.m. UTC | #1
On Wed, Oct 02, 2019 at 11:09:13PM +0530, aliasgar.surti500@gmail.com wrote:
> From: Aliasgar Surti <aliasgar.surti500@gmail.com>
> 
> Status variable is initialized and returned without updating it's value.
> Removed status variable and returned value directly.
> 
> Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
> ---
>  drivers/usb/musb/musb_gadget.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
> index ffe462a657b1..2cb31fc0cd60 100644
> --- a/drivers/usb/musb/musb_gadget.c
> +++ b/drivers/usb/musb/musb_gadget.c
> @@ -1085,7 +1085,6 @@ static int musb_gadget_disable(struct usb_ep *ep)
>  	u8		epnum;
>  	struct musb_ep	*musb_ep;
>  	void __iomem	*epio;
> -	int		status = 0;
>  
>  	musb_ep = to_musb_ep(ep);
>  	musb = musb_ep->musb;
> @@ -1118,7 +1117,7 @@ static int musb_gadget_disable(struct usb_ep *ep)
>  
>  	musb_dbg(musb, "%s", musb_ep->end_point.name);
>  
> -	return status;
> +	return 0;
>  }
>  
>  /*
> -- 
> 2.17.1
> 

Someone else sent this same patch 2 hours before you did, sorry :(
diff mbox series

Patch

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index ffe462a657b1..2cb31fc0cd60 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1085,7 +1085,6 @@  static int musb_gadget_disable(struct usb_ep *ep)
 	u8		epnum;
 	struct musb_ep	*musb_ep;
 	void __iomem	*epio;
-	int		status = 0;
 
 	musb_ep = to_musb_ep(ep);
 	musb = musb_ep->musb;
@@ -1118,7 +1117,7 @@  static int musb_gadget_disable(struct usb_ep *ep)
 
 	musb_dbg(musb, "%s", musb_ep->end_point.name);
 
-	return status;
+	return 0;
 }
 
 /*