Re: BUG in driver model class.c

From: Greg KH (
Date: Wed Jun 11 2003 - 12:18:55 EST

On Wed, Jun 11, 2003 at 01:12:47PM -0400, Alan Stern wrote:
> 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.

Already fixed in Linus's -bk tree :)

thanks for pointing it out though.

greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:28 EST