From: Michal Nazarewicz Date: Wed, 12 May 2010 10:51:13 +0000 (+0200) Subject: USB: gadget: f_mass_storage: fix in error recovery X-Git-Tag: v2.6.35-rc1~471^2~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9e000884e50bf6b25a92a3f3580e1d14fe01591;p=pandora-kernel.git USB: gadget: f_mass_storage: fix in error recovery In to places in fsg_common_init() an unconditional call to kfree() on common was performed in error recovery which is not a valid behaviour since fsg_common structure is not always allocated by fsg_common_init(). To fix, the calls has been replaced with a goto to a proper error recovery which does the correct thing. Also, refactored fsg_common_release() function. Signed-off-by: Michal Nazarewicz Reviewed-by: Viral Mehta Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed