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

2015-01-08 Thread Felipe Balbi
Hi, On Wed, Dec 24, 2014 at 03:23:07PM +0100, Michal Nazarewicz wrote: > On Wed, Dec 24 2014, Rohith Seelaboyina wrote: > > This patch fixes the sparse error in functionfs > > driver. > > > > drivers/usb/gadget/function/f_fs.c:400:44: error: bad > > constant experssion. > > > > Dynamic memory allo

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

2014-12-24 Thread Michal Nazarewicz
On Wed, Dec 24 2014, Rohith Seelaboyina wrote: > 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 kcalloc is more safer > than declaring variable array size, Fix this erro

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

2014-12-24 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 kcalloc is more safer than declaring variable array size, Fix this error by using kcalloc for memory allocation, Check if memory all