Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1450030 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-07-26 00:00 +0200 |
| Last post | 2016-07-27 11:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] usb: gadget: remove redundant self assignment Colin King <colin.king@canonical.com> - 2016-07-26 00:00 +0200
Re: [PATCH] usb: gadget: remove redundant self assignment Peter Chen <hzpeterchen@gmail.com> - 2016-07-27 11:40 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-07-26 00:00 +0200 |
| Subject | [PATCH] usb: gadget: remove redundant self assignment |
| Message-ID | <rYW4N-1xV-9@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
The assignment ret = ret is redundant and can be removed.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
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 ff8685e..48cf1a3 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -107,10 +107,8 @@ int usb_ep_enable(struct usb_ep *ep)
goto out;
ret = ep->ops->enable(ep, ep->desc);
- if (ret) {
- ret = ret;
+ if (ret)
goto out;
- }
ep->enabled = true;
--
2.8.1
[toc] | [next] | [standalone]
| From | Peter Chen <hzpeterchen@gmail.com> |
|---|---|
| Date | 2016-07-27 11:40 +0200 |
| Message-ID | <rZttL-5ZR-3@gated-at.bofh.it> |
| In reply to | #1450030 |
On Mon, Jul 25, 2016 at 10:57:36PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment ret = ret is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> 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 ff8685e..48cf1a3 100644
> --- a/drivers/usb/gadget/udc/core.c
> +++ b/drivers/usb/gadget/udc/core.c
> @@ -107,10 +107,8 @@ int usb_ep_enable(struct usb_ep *ep)
> goto out;
>
> ret = ep->ops->enable(ep, ep->desc);
> - if (ret) {
> - ret = ret;
> + if (ret)
> goto out;
> - }
>
> ep->enabled = true;
>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
--
Best Regards,
Peter Chen
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web