Messages in this thread Patch in this message | | | Subject | Re: [PATCH] Driver Core update for 2.6.6-rc1 | Date | Thu, 15 Apr 2004 10:41:52 -0700 | From | Greg KH <> |
| |
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"); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |