On Tue, Oct 05, 2010 at 06:20:05AM -0700, Greg KH wrote:
Sorry I guess I lost track of the discussion. We could write a helper
macro which added the extra put device on failure? Isn't that the more
common case anyway? To be honest, I'm still not clear on when the extra
put_device() is appropriate and when it's not. :/ I'll look through
the archive.
Anyway, I would prefer a slightly different patch. The logic is easier
to follow if we keep the put_device() right next to the
device_register(). Also if we keep it in one function and we add a
helper macro later then coccinelle can rewrite it automatically.
I'll send my patch.
regards,
dan carpenter
--