diff options
author | b14ckcat <b14ckcat@protonmail.com> | 2022-08-28 01:58:16 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-17 17:11:13 +0200 |
commit | 3452cbd1edfe0d0c90cf502a8c485258eeba413e (patch) | |
tree | e306995d1aeb81d5b42ad3016a46b234a07bbeb9 | |
parent | f6dfd7726845262b250ef1427dd8a07c9320995a (diff) | |
download | serenity-3452cbd1edfe0d0c90cf502a8c485258eeba413e.zip |
Kernel/USB: Hotplug multiple USB device crash hotfix
-rw-r--r-- | Kernel/Bus/USB/USBHub.cpp | 2 |
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; |