ChangeSet 1.1643.36.4, 2004/03/19 14:15:17-08:00, greg@kroah.com Driver class: remove possible oops This happens when the device associated with a class device goes away before the class does. drivers/base/class.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -Nru a/drivers/base/class.c b/drivers/base/class.c --- a/drivers/base/class.c Thu Apr 15 10:21:13 2004 +++ b/drivers/base/class.c Thu Apr 15 10:21:13 2004 @@ -155,8 +155,7 @@ static void class_device_dev_unlink(struct class_device * class_dev) { - if (class_dev->dev) - sysfs_remove_link(&class_dev->kobj, "device"); + sysfs_remove_link(&class_dev->kobj, "device"); } static int class_device_driver_link(struct class_device * class_dev) @@ -169,8 +168,7 @@ 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"); + sysfs_remove_link(&class_dev->kobj, "driver"); }