[PATCH 4.9 023/102] usb: gadget: remove redundant self assignment

From: Greg Kroah-Hartman
Date: Fri Apr 06 2018 - 09:33:31 EST


4.9-stable review patch. If anyone has any objections, please let me know.

------------------

From: Stefan Agner <stefan@xxxxxxxx>

commit 8a8b161df5ce06ef5a315899f83978e765be09e8 upstream.

The assignment ret = ret is redundant and can be removed.

Reviewed-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx>
Reviewed-by: Peter Chen <peter.chen@xxxxxxx>
Signed-off-by: Stefan Agner <stefan@xxxxxxxx>
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
Cc: Nathan Chancellor <natechancellor@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/usb/gadget/udc/core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- 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;