Commit 5df31005 authored by Patrick Mochel's avatar Patrick Mochel

Driver Class: don't call put_device() when we never called get_device()

From Greg: 

This fixes a oops when unplugging pci network devices.
parent f13c193a
......@@ -316,11 +316,8 @@ void class_device_del(struct class_device *class_dev)
up_write(&parent->subsys.rwsem);
}
if (class_dev->dev) {
class_device_dev_unlink(class_dev);
class_device_driver_unlink(class_dev);
put_device(class_dev->dev);
}
kobject_del(&class_dev->kobj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment