usb: gadget: f_fs: check for allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 24 Jun 2016 12:23:16 +0000 (15:23 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 29 Jun 2016 08:13:33 +0000 (11:13 +0300)
commit44963d649da63ce8ed8f41b8a267c745ca1ec0b0
tree1c0e079d1c65a465ad9b98732b7db426dec239d5
parente43470dbdfe8922f9b2962184336efaa71e59727
usb: gadget: f_fs: check for allocation failure

Return -ENOMEM if kmalloc() fails.

Fixes: 9353afbbfa7b ('usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_fs.c