diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index be1cc5143354..ef522ae55480 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -530,7 +530,8 @@ void bus_remove_device(struct device *dev) | |||
530 | sysfs_remove_link(&dev->bus->p->devices_kset->kobj, | 530 | sysfs_remove_link(&dev->bus->p->devices_kset->kobj, |
531 | dev->bus_id); | 531 | dev->bus_id); |
532 | device_remove_attrs(dev->bus, dev); | 532 | device_remove_attrs(dev->bus, dev); |
533 | klist_del(&dev->knode_bus); | 533 | if (klist_node_attached(&dev->knode_bus)) |
534 | klist_del(&dev->knode_bus); | ||
534 | 535 | ||
535 | pr_debug("bus: '%s': remove device %s\n", | 536 | pr_debug("bus: '%s': remove device %s\n", |
536 | dev->bus->name, dev->bus_id); | 537 | dev->bus->name, dev->bus_id); |