Skip to content

Commit

Permalink
usb: fix breakage on systems without ACPI
Browse files Browse the repository at this point in the history
Commit da0af6e ("usb: Bind devices to ACPI devices when possible") really
tries to force-bind devices even when impossible, unlike what it says in
the subject.

CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
is an indication that any USB relevant information is present in them. There
is no reason to fail the creation of a USB bus if it can't bind it to
ACPI device during initialization.

On systems with CONFIG_ACPI set but without ACPI tables it would cause a
boot panic.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sasha Levin authored and Greg Kroah-Hartman committed May 16, 2012
1 parent e4083ea commit ea79c2e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,9 +1015,7 @@ static int __init usb_init(void)
if (retval)
goto out;

retval = usb_acpi_register();
if (retval)
goto acpi_register_failed;
usb_acpi_register();
retval = bus_register(&usb_bus_type);
if (retval)
goto bus_register_failed;
Expand Down Expand Up @@ -1053,7 +1051,6 @@ static int __init usb_init(void)
bus_unregister(&usb_bus_type);
bus_register_failed:
usb_acpi_unregister();
acpi_register_failed:
usb_debugfs_cleanup();
out:
return retval;
Expand Down

0 comments on commit ea79c2e

Please sign in to comment.