usb: pch_udc: unlock on allocation failure
authorDan Carpenter <error27@gmail.com>
Sun, 20 Mar 2011 11:09:50 +0000 (14:09 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Apr 2011 22:44:05 +0000 (15:44 -0700)
commit485707116b3949ab41e1aba8d74f45a7551e3a65
treeb78a9ca59b2c2e930d61f96d94194ee66811fdc8
parent9ab7927bb845cf2549110b19c212fe44a2bfbacb
usb: pch_udc: unlock on allocation failure

There was an unlock missing on the error path.

Also I did a small cleanup by changing ep->dev->lock for just dev->lock.
They're the same lock, but dev->lock is shorter and that's how it is
used for the spin_unlock_irqrestore() call.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/pch_udc.c