Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450030

[PATCH] usb: gadget: remove redundant self assignment

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] usb: gadget: remove redundant self assignment
Date 2016-07-26 00:00 +0200
Message-ID <rYW4N-1xV-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[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

csiph-web