Commit 99e38b6e authored by Luiz Capitulino's avatar Luiz Capitulino Committed by Greg Kroah-Hartman

[PATCH] USB: usb/core/hcd.c::usb_init() missing audit.

Signed-off-by: default avatarLuiz Capitulino <lcapitulino@prefeitura.sp.gov.br>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 8df7385f
...@@ -626,9 +626,9 @@ static struct class usb_host_class = { ...@@ -626,9 +626,9 @@ static struct class usb_host_class = {
.release = &usb_host_release, .release = &usb_host_release,
}; };
void usb_host_init(void) int usb_host_init(void)
{ {
class_register(&usb_host_class); return class_register(&usb_host_class);
} }
void usb_host_cleanup(void) void usb_host_cleanup(void)
......
...@@ -1300,7 +1300,9 @@ static int __init usb_init(void) ...@@ -1300,7 +1300,9 @@ static int __init usb_init(void)
retval = bus_register(&usb_bus_type); retval = bus_register(&usb_bus_type);
if (retval) if (retval)
goto out; goto out;
usb_host_init(); retval = usb_host_init();
if (retval)
goto host_init_failed;
retval = usb_major_init(); retval = usb_major_init();
if (retval) if (retval)
goto major_init_failed; goto major_init_failed;
...@@ -1322,6 +1324,7 @@ static int __init usb_init(void) ...@@ -1322,6 +1324,7 @@ static int __init usb_init(void)
usb_major_cleanup(); usb_major_cleanup();
major_init_failed: major_init_failed:
usb_host_cleanup(); usb_host_cleanup();
host_init_failed:
bus_unregister(&usb_bus_type); bus_unregister(&usb_bus_type);
out: out:
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment