]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/usb/gadget/function/f_mass_storage.c
usb: gadget: mass_storage: Free buffers if create lun fails
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 20 Jul 2015 18:15:17 +0000 (20:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Jul 2015 14:59:19 +0000 (09:59 -0500)
commit903588a99c26ed6f103eaa0cfa4ccbe9cd779398
tree4a761c5688f43bf48eb3636998aa0965fb9f64b3
parentaa7399744dd02537523b7bf9e3070600b6f79751
usb: gadget: mass_storage: Free buffers if create lun fails

Creation of LUN 0 may fail (for example due to ENOMEM).
As fsg_common_set_num_buffers() does some memory allocation
we should free it before it becomes unavailable.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_mass_storage.c