Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-22 Thread Javier Martinez Canillas
Hello Sudip, On 09/22/2015 06:52 AM, Sudip Mukherjee wrote: > On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote: >> The driver is using -1 instead of the -ENOMEM defined macro to specify >> that a buffer allocation failed. Since the error number is propagated, >> the caller

Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-22 Thread Sudip Mukherjee
On Tue, Sep 22, 2015 at 08:38:43AM +0200, Javier Martinez Canillas wrote: > Hello Sudip, > > On 09/22/2015 06:52 AM, Sudip Mukherjee wrote: > > On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote: > >> The driver is using -1 instead of the -ENOMEM defined macro to specify >

Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-21 Thread Sudip Mukherjee
On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote: > The driver is using -1 instead of the -ENOMEM defined macro to specify > that a buffer allocation failed. Since the error number is propagated, > the caller will get a -EPERM which is the wrong error condition. Just a

[PATCH] staging: dgap: fix returned errno code in dgap_parsefile()

2015-09-21 Thread Javier Martinez Canillas
The driver is using -1 instead of the -ENOMEM defined macro to specify that a buffer allocation failed. Since the error number is propagated, the caller will get a -EPERM which is the wrong error condition. Also, the smatch tool complains with the following warning: dgap_parsefile() warn: