commit | f479d70b4f7674083c2e3c3e603b15811713fb18 | [log] [tgz] |
---|---|---|
author | Peter Korsgaard <jacmet@sunsite.dk> | Fri Mar 12 15:55:28 2010 +0100 |
committer | Greg Kroah-Hartman <gregkh@suse.de> | Fri Mar 19 07:24:20 2010 -0700 |
tree | 8d42b82cddf3e3304f5ae955294e990af7f3aebf | |
parent | f88f6691b73a35b0c6dcabb9e587aa4c63d09010 [diff] |
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 <jacmet@sunsite.dk> Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>