summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorb14ckcat <b14ckcat@protonmail.com>2022-08-28 01:58:16 -0400
committerAndreas Kling <kling@serenityos.org>2022-09-17 17:11:13 +0200
commit3452cbd1edfe0d0c90cf502a8c485258eeba413e (patch)
treee306995d1aeb81d5b42ad3016a46b234a07bbeb9
parentf6dfd7726845262b250ef1427dd8a07c9320995a (diff)
downloadserenity-3452cbd1edfe0d0c90cf502a8c485258eeba413e.zip
Kernel/USB: Hotplug multiple USB device crash hotfix
-rw-r--r--Kernel/Bus/USB/USBHub.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Bus/USB/USBHub.cpp b/Kernel/Bus/USB/USBHub.cpp
index 1a7e19e4e2..bbb3d5bdcf 100644
--- a/Kernel/Bus/USB/USBHub.cpp
+++ b/Kernel/Bus/USB/USBHub.cpp
@@ -45,6 +45,8 @@ ErrorOr<void> Hub::enumerate_and_power_on_hub()
// USBDevice::enumerate_device must be called before this.
VERIFY(m_address > 0);
+ m_sysfs_device_info_node = TRY(SysFSUSBDeviceInformation::create(*this));
+
if (m_device_descriptor.device_class != USB_CLASS_HUB) {
dbgln("USB Hub: Trying to enumerate and power on a device that says it isn't a hub.");
return EINVAL;