Commit 667de9e8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Driver class: remove possible oops

This happens when the device associated with a class device goes away before
the class does.
parent 6746ea4d
......@@ -155,7 +155,6 @@ static int class_device_dev_link(struct class_device * class_dev)
static void class_device_dev_unlink(struct class_device * class_dev)
{
if (class_dev->dev)
sysfs_remove_link(&class_dev->kobj, "device");
}
......@@ -169,7 +168,6 @@ static int class_device_driver_link(struct class_device * class_dev)
static void class_device_driver_unlink(struct class_device * class_dev)
{
if ((class_dev->dev) && (class_dev->dev->driver))
sysfs_remove_link(&class_dev->kobj, "driver");
}
......
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