Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46668
b: refs/heads/master
c: de44743
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent fedf7b1 commit 98ea529
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 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: 4a1a4d8b87389e35c3af04c0d0a95f6a0391b964
refs/heads/master: de44743b033942731f6b898c2d389f7ee5ac890b
33 changes: 15 additions & 18 deletions trunk/drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,6 @@ MODULE_LICENSE ("GPL");
static int __init ohci_hcd_mod_init(void)
{
int retval = 0;
int ls = 0;

if (usb_disabled())
return -ENODEV;
Expand All @@ -941,46 +940,44 @@ static int __init ohci_hcd_mod_init(void)
#ifdef PLATFORM_DRIVER
retval = platform_driver_register(&PLATFORM_DRIVER);
if (retval < 0)
return retval;
ls++;
goto error_platform;
#endif

#ifdef OF_PLATFORM_DRIVER
retval = of_register_platform_driver(&OF_PLATFORM_DRIVER);
if (retval < 0)
goto error;
ls++;
goto error_of_platform;
#endif

#ifdef SA1111_DRIVER
retval = sa1111_driver_register(&SA1111_DRIVER);
if (retval < 0)
goto error;
ls++;
goto error_sa1111;
#endif

#ifdef PCI_DRIVER
retval = pci_register_driver(&PCI_DRIVER);
if (retval < 0)
goto error;
ls++;
goto error_pci;
#endif

return retval;

/* Error path */
error:
#ifdef PLATFORM_DRIVER
if (ls--)
platform_driver_unregister(&PLATFORM_DRIVER);
#ifdef PCI_DRIVER
error_pci:
#endif
#ifdef SA1111_DRIVER
sa1111_driver_unregister(&SA1111_DRIVER);
error_sa1111:
#endif
#ifdef OF_PLATFORM_DRIVER
if (ls--)
of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
error_of_platform:
#endif
#ifdef SA1111_DRIVER
if (ls--)
sa1111_driver_unregister(&SA1111_DRIVER);
#ifdef PLATFORM_DRIVER
platform_driver_unregister(&PLATFORM_DRIVER);
error_platform:
#endif
return retval;
}
Expand Down

0 comments on commit 98ea529

Please sign in to comment.