Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115778
b: refs/heads/master
c: 28c2c51
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Oct 17, 2008
1 parent 61094f0 commit 10cba91
Show file tree
Hide file tree
Showing 2 changed files with 22 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: 458e6a511f9dc91e5af5e64740b0a5c9650a25fb
refs/heads/master: 28c2c51c078296151549f4f0e823e804f773861b
32 changes: 21 additions & 11 deletions trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2055,15 +2055,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)

}

return 0;

fail:
if (musb->clock)
clk_put(musb->clock);
device_init_wakeup(dev, 0);
musb_free(musb);
return status;

#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
status = device_create_file(dev, &dev_attr_vbus);
Expand All @@ -2072,12 +2063,31 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
status = 0;
#endif
if (status)
goto fail2;

return status;
return 0;

fail2:
#ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus);
#ifdef CONFIG_USB_MUSB_OTG
device_remove_file(musb->controller, &dev_attr_srp);
#endif
#endif
musb_platform_exit(musb);
goto fail;
fail:
dev_err(musb->controller,
"musb_init_controller failed with status %d\n", status);

if (musb->clock)
clk_put(musb->clock);
device_init_wakeup(dev, 0);
musb_free(musb);

return status;

}

/*-------------------------------------------------------------------------*/
Expand Down

0 comments on commit 10cba91

Please sign in to comment.