diff options
author | Michal Nazarewicz <m.nazarewicz@samsung.com> | 2010-05-12 12:51:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 13:21:45 -0700 |
commit | b9e000884e50bf6b25a92a3f3580e1d14fe01591 (patch) | |
tree | 05188e049219fed1cacc50f09e1d62a296d95bbe /drivers/usb/core | |
parent | f537da685c35a81a75f6067751bddb902c8adb68 (diff) | |
download | kernel-common-b9e000884e50bf6b25a92a3f3580e1d14fe01591.tar.gz kernel-common-b9e000884e50bf6b25a92a3f3580e1d14fe01591.tar.bz2 kernel-common-b9e000884e50bf6b25a92a3f3580e1d14fe01591.zip |
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 <mina86@mina86.com>
Reviewed-by: Viral Mehta <viral.mehta@lntinfotech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
0 files changed, 0 insertions, 0 deletions