Re: [PATCH] kobject: should use kobject_put() in kset-example

From: Greg KH
Date: Thu Jun 12 2008 - 23:56:30 EST


On Fri, Jun 13, 2008 at 11:09:16AM +0800, Li Zefan wrote:
> We should call kobject_put() instead of kfree() if kobject_init_and_add()
> returns an error, shouldn't we? Don't set up a bad example ;)

Ah, good catch, you are right. I'll go add this to my queue, thanks for
the patch.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/