USB: gadget: f_mass_storage: put_device() in error recovery
USB: gadget: f_mass_storage: put_device() in error recovery

This commit fixes an issue with error recovery after
device_register() fails in Mass Storage Function.  The device
needs to be put to avoid resource leakage.

Signed-off-by: Rahul Ruikar <893074979851cdd0ea25e74c4064246a67bbadc8@gmail.com>
[605208d9b4c769ca62e9f9f8b592c9cd465fe6d7@mina86.com: updated commit message]
Signed-off-by: Michal Nazarewicz <605208d9b4c769ca62e9f9f8b592c9cd465fe6d7@mina86.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs