usb: gadget: f_fs: Give chance to retry malloc for large size buffer 76/226076/1
authorDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 26 Oct 2018 01:41:41 +0000 (10:41 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 26 Feb 2020 11:24:41 +0000 (20:24 +0900)
commite6e8e92819eaa5af38888f51ca6f8299ce2f27dd
tree6b76d8e144e78b355c475b1e230e374b57abc28e
parentc5ed47c6f419a8e5934a57d07ac37c9fa6381057
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