public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Stefan Agner <stefan@agner.ch>
Cc: balbi@kernel.org, gregkh@linuxfoundation.org, peter.chen@nxp.com,
	k.opasiak@samsung.com, yoshihiro.shimoda.uh@renesas.com,
	colin.king@canonical.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: remove redundant self assignment
Date: Mon, 17 Apr 2017 15:42:44 +0800	[thread overview]
Message-ID: <20170417074244.GA15565@b29397-desktop> (raw)
In-Reply-To: <20170417031250.407-1-stefan@agner.ch>

On Sun, Apr 16, 2017 at 08:12:50PM -0700, Stefan Agner wrote:
> The assignment ret = ret is redundant and can be removed.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> A very similar patch has been applied already last year, but there is
> a second such assignment...
> 
> --
> Stefan
> 
>  drivers/usb/gadget/udc/core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
> index d685d82dcf48..b57bd53812fe 100644
> --- a/drivers/usb/gadget/udc/core.c
> +++ b/drivers/usb/gadget/udc/core.c
> @@ -139,10 +139,8 @@ int usb_ep_disable(struct usb_ep *ep)
>  		goto out;
>  
>  	ret = ep->ops->disable(ep);
> -	if (ret) {
> -		ret = ret;
> +	if (ret)
>  		goto out;
> -	}
>  
>  	ep->enabled = false;
>  

Reviewed-by: Peter Chen <peter.chen@nxp.com>

-- 

Best Regards,
Peter Chen

  reply	other threads:[~2017-04-17  7:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170417031117epcas5p3cba067df249c6f0fcfad0eb09eb20040@epcas5p3.samsung.com>
2017-04-17  3:12 ` [PATCH] usb: gadget: remove redundant self assignment Stefan Agner
2017-04-17  7:42   ` Peter Chen [this message]
2017-04-19  9:01   ` Krzysztof Opasiak
2016-07-25 21:57 Colin King
2016-07-27  9:27 ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170417074244.GA15565@b29397-desktop \
    --to=hzpeterchen@gmail.com \
    --cc=balbi@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.opasiak@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@nxp.com \
    --cc=stefan@agner.ch \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox