Skip to content

Commit

Permalink
usb: cdns3: gadget: Remove unneeded variable ret
Browse files Browse the repository at this point in the history
Remove unneeded variable ret used to store return value,just return 0.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Acked-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/1576826378-4387-1-git-send-email-vulab@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Xu Wang authored and Greg Kroah-Hartman committed Dec 30, 2019
1 parent 7b104f8 commit 8e1a200
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/cdns3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,6 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
struct cdns3_endpoint *priv_ep;
u32 bEndpointAddress;
struct usb_ep *ep;
int ret = 0;
int val;

priv_dev->gadget_driver = NULL;
Expand All @@ -2413,7 +2412,7 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
writel(0, &priv_dev->regs->usb_ien);
writel(USB_CONF_DEVDS, &priv_dev->regs->usb_conf);

return ret;
return 0;
}

static const struct usb_gadget_ops cdns3_gadget_ops = {
Expand Down

0 comments on commit 8e1a200

Please sign in to comment.