Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drivers: musb: removed unused status variable
@ 2019-10-02 17:39 aliasgar.surti500
  2019-10-04 12:11 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: aliasgar.surti500 @ 2019-10-02 17:39 UTC (permalink / raw)
  To: b-liu, gregkh, linux-usb; +Cc: Aliasgar Surti

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: musb: removed unused status variable
  2019-10-02 17:39 [PATCH] drivers: musb: removed unused status variable aliasgar.surti500
@ 2019-10-04 12:11 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-10-04 12:11 UTC (permalink / raw)
  To: aliasgar.surti500; +Cc: b-liu, linux-usb

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 :(

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 17:39 [PATCH] drivers: musb: removed unused status variable aliasgar.surti500
2019-10-04 12:11 ` Greg KH

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git