BUG in driver model class.c

Alan Stern
2003-06-11T16:59:06Z

Greg:

There is a bug in drivers/base/class.c in 2.5.70. Near the start of the
routine class_device_add() are the lines

if (class_dev->dev)
get_device(class_dev->dev);

But there's nothing to undo this get_device, either in the error return
part of class_device_add() or in class_device_del().

I assume that either this get_device() doesn't belong there or else there
should be corresponding put_device() calls in the other two spots.
Whichever is the case, it should be easy for you to fix.

Alan Stern