diff --git a/src/system/kernel/device_manager/legacy_drivers.cpp b/src/system/kernel/device_manager/legacy_drivers.cpp index db7b94fdc2..386edfa366 100644 --- a/src/system/kernel/device_manager/legacy_drivers.cpp +++ b/src/system/kernel/device_manager/legacy_drivers.cpp @@ -311,7 +311,7 @@ republish_driver(legacy_driver* driver) break; TRACE(("devfs: unpublishing no more present \"%s\"\n", entry->path)); - LegacyDevice* device = get_device_for_path(driver, devicePaths[0]); + LegacyDevice* device = get_device_for_path(driver, entry->path); if (device != NULL) { driver->devices.Remove(device); delete device;