Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364540
b: refs/heads/master
c: 2533bee
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent 9b5bc3f commit 4f79bb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12ad0fcaf2fbf3f48dd2b4dbaff372830aada8a2
refs/heads/master: 2533beea9025254215be65cd1fca8da65019fd04
13 changes: 2 additions & 11 deletions trunk/drivers/usb/gadget/at91_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@ static int at91udc_probe(struct platform_device *pdev)

/* init software state */
udc = &controller;
udc->gadget.register_my_device = true;
udc->gadget.dev.parent = dev;
if (pdev->dev.of_node)
at91udc_of_init(udc, pdev->dev.of_node);
Expand Down Expand Up @@ -1780,13 +1781,7 @@ static int at91udc_probe(struct platform_device *pdev)
DBG("clocks missing\n");
retval = -ENODEV;
/* NOTE: we "know" here that refcounts on these are NOPs */
goto fail0b;
}

retval = device_register(&udc->gadget.dev);
if (retval < 0) {
put_device(&udc->gadget.dev);
goto fail0b;
goto fail1;
}

/* don't do anything until we have both gadget driver and VBUS */
Expand Down Expand Up @@ -1857,8 +1852,6 @@ static int at91udc_probe(struct platform_device *pdev)
fail2:
free_irq(udc->udp_irq, udc);
fail1:
device_unregister(&udc->gadget.dev);
fail0b:
iounmap(udc->udp_baseaddr);
fail0a:
if (cpu_is_at91rm9200())
Expand Down Expand Up @@ -1892,8 +1885,6 @@ static int __exit at91udc_remove(struct platform_device *pdev)
gpio_free(udc->board.vbus_pin);
}
free_irq(udc->udp_irq, udc);
device_unregister(&udc->gadget.dev);

iounmap(udc->udp_baseaddr);

if (cpu_is_at91rm9200())
Expand Down

0 comments on commit 4f79bb1

Please sign in to comment.