Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1625962
| From | Krzysztof Opasiak <k.opasiak@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usb: gadget: remove redundant self assignment |
| Date | 2017-04-19 11:10 +0200 |
| Message-ID | <txTMC-1zl-43@gated-at.bofh.it> (permalink) |
| References | <txTMC-1zl-45@gated-at.bofh.it> <tx5mN-3TH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/17/2017 05:12 AM, 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: Krzysztof Opasiak <k.opasiak@samsung.com>
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] usb: gadget: remove redundant self assignment Stefan Agner <stefan@agner.ch> - 2017-04-17 05:20 +0200 Re: [PATCH] usb: gadget: remove redundant self assignment Peter Chen <hzpeterchen@gmail.com> - 2017-04-17 09:50 +0200 Re: [PATCH] usb: gadget: remove redundant self assignment Krzysztof Opasiak <k.opasiak@samsung.com> - 2017-04-19 11:10 +0200
csiph-web