USB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller driver
authorJesper Juhl <jesper.juhl@gmail.com>
Fri, 28 Mar 2008 21:50:27 +0000 (14:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:47 +0000 (21:16 -0700)
commit73d79aaba9ee21aaa1a6676f568ef7b3bdf993ea
tree13ac17bdca5816cc7b7c5124823905be1139f35f
parent148d9fe4c91a6356dae1b05b76b8133586c26be4
USB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller driver

In drivers/usb/gadget/amd5536udc.c::udc_pci_probe(), sizeof(struct udc)
storage is allocated for 'dev'.

There are many exit points from the function where 'dev' is not free'd but has
also not yet been used for anything.  The following patch free's 'dev' at the
return points where it has not yet been used.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/amd5536udc.c