usb: gadget: ffs: call functionfs_unbind() if _ffs_func_bind() fails
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 13 Jul 2015 09:03:50 +0000 (11:03 +0200)
committerFelipe Balbi <balbi@ti.com>
Fri, 31 Jul 2015 13:57:57 +0000 (08:57 -0500)
commit55d811211b139ed097ddaf40d173c258f133c130
treeb043306a7b0793dc2998226ea3ad415645a5445e
parent913e4a90b6f9687ac0f543e7b632753e4f51c441
usb: gadget: ffs: call functionfs_unbind() if _ffs_func_bind() fails

Function ffs_do_functionfs_bind() calls functionfs_bind() which allocates
usb request and increments refcounts. These things needs to be cleaned
up by if further steps of initialization fail by calling functionfs_unbind().

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_fs.c