From: Peter Korsgaard Date: Fri, 12 Mar 2010 14:55:28 +0000 (+0100) Subject: USB: gadget: f_mass_storage::fsg_bind(): fix error handling X-Git-Tag: v2.6.34-rc2~8^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f479d70b4f7674083c2e3c3e603b15811713fb18;p=pandora-kernel.git USB: gadget: f_mass_storage::fsg_bind(): fix error handling Contrary to the comment in fsg_add, fsg_bind calls fsg_unbind on errors, which decreases refcount and frees the fsg_dev structure, causing trouble when fsg_add does the same. Fix it by simply leaving up cleanup to fsg_add(). Signed-off-by: Peter Korsgaard Acked-by: Michal Nazarewicz Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed