Re: [RESEND/PATCH] usb: gadget: goku_udc: Fix error path

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dan Carpenter
Date: Tuesday, October 5, 2010 - 9:53 am

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RESEND/PATCH] usb: gadget: goku_udc: Fix error path, Rahul Ruikar, (Sun Oct 3, 12:59 pm)
Re: [RESEND/PATCH] usb: gadget: goku_udc: Fix error path, Dan Carpenter, (Tue Oct 5, 9:53 am)
[PATCH] usb: gadget: goku_udc: Fix error path, Dan Carpenter, (Tue Oct 5, 9:55 am)