[PATCH] usb: gadget: ffs: Fix sparse error

2014-12-23 Thread Rohith Seelaboyina
This patch fixes the sparse error in functionfs driver. drivers/usb/gadget/function/f_fs.c:400:44: error: bad constant experssion. Dynamic memory allocation through kmalloc is more safer than declaring variable array size, Fix this error by using kmalloc for memory allocation, Check if memory

Re: [PATCH] usb: gadget: ffs: Fix sparse error

2014-12-23 Thread Joe Perches
On Wed, 2014-12-24 at 10:59 +0530, Rohith Seelaboyina wrote: Dynamic memory allocation through kmalloc is more safer than declaring variable array size, Fix this error by using kmalloc for memory allocation, Check if memory allocation is successful and return -ENOMEM on failure. [] diff --git