usb: gadget: f_fs: Give chance to retry malloc for large size buffer
authorDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 26 Oct 2018 01:41:41 +0000 (10:41 +0900)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 2 Apr 2020 04:09:12 +0000 (13:09 +0900)
commit6afe31dda2f7b02e1578f50a4a6744c1505202f3
tree6999b6966d7e80dbf7ab834c99e8bfd3443a5468
parentd20b66f778950a64dae359cec9c924ce669e717d
usb: gadget: f_fs: Give chance to retry malloc for large size buffer

The f_fs daemons usually use large size buffer for increasing transfer
performance, but it can cause memory allocation failure in case of
that buddy space is fragmented. Since this, instead of just returning
error in this case, give the chance to retry to allocate memory with
a half length in order to prevent daemon crash due to failure of
buffer allocation.

Change-Id: I2171932b8cb565102d63eb82c114987b85d26ed9
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
drivers/usb/gadget/function/f_fs.c