[PATCHv3] staging: rtl8712: Fix freeing ERR_PTR

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
The return value of memdup_user is a pointer to errno.Freeing it will cause error.Hence set it to NULL before branching to free the pointer.smatch also raises the same warning. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- v2:Remove unnecessary goto and return error

Re: [PATCH] staging: rtl8712: return error directly

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
From: gre...@linuxfoundation.org gre...@linuxfoundation.org Sent: Thursday, April 30, 2015 3:05 PM To: Gujulan Elango, Hari Prasath (H.) Cc: de...@driverdev.osuosl.org; julia.law...@lip6.fr; dan.carpen...@oracle.com; larry.fin...@lwfinger.net; florian.c.schilha...@googlemail.com; Babu

[PATCHv2] staging: rtl8712: return error directly

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
return error directly to avoid unwanted branching where no cleanup is done.Also removes the ret variable. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff

[PATCH] staging: rtl8192e: fix wrong assignment

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
the equivalent negative number as per Larry Finger. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging

Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-04-30 Thread hari prasath
On 30 April 2015 at 19:44, gre...@linuxfoundation.org gre...@linuxfoundation.org wrote: On Thu, Apr 23, 2015 at 04:09:28PM +0100, Alan Cox wrote: On Thu, 2015-04-23 at 13:43 +, Gujulan Elango, Hari Prasath (H.) wrote: This patch removes unwanted semicolon around close braces of code

Re: [PATCH] staging: rtl8192e: fix wrong assignment

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
From: Dan Carpenter dan.carpen...@oracle.com Sent: Thursday, April 30, 2015 6:33 PM To: Gujulan Elango, Hari Prasath (H.) Cc: de...@driverdev.osuosl.org; julia.law...@lip6.fr; gre...@linuxfoundation.org; wlan...@realtek.com; mateusz.kulikow...@gmail.com; Babu, Viswanathan (V.); larry.fin

Re: [PATCH] staging: rtl8192e: fix wrong assignment

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
From: Larry Finger larry.fin...@gmail.com on behalf of Larry Finger larry.fin...@lwfinger.net Sent: Thursday, April 30, 2015 11:03 PM To: Gujulan Elango, Hari Prasath (H.); Dan Carpenter Cc: de...@driverdev.osuosl.org; julia.law...@lip6.fr; gre...@linuxfoundation.org; wlan...@realtek.com

Re: [PATCH] staging: lustre: declare file operations structure as static

2015-04-30 Thread hari prasath
On 30 April 2015 at 19:54, gre...@linuxfoundation.org gre...@linuxfoundation.org wrote: On Fri, Apr 24, 2015 at 07:52:31AM +, Gujulan Elango, Hari Prasath (H.) wrote: The fops structure is referenced only locally and hence could be made static Signed-off-by: Hari Prasath Gujulan Elango

Re: [PATCH] staging: rtl8712: Fix freeing ERR_PTR

2015-04-30 Thread Gujulan Elango, Hari Prasath (H.)
From: Julia Lawall julia.law...@lip6.fr Sent: Thursday, April 30, 2015 12:12 AM To: Gujulan Elango, Hari Prasath (H.) Cc: sh...@linux.com; cristina.oprice...@gmail.com; hamohammed...@gmail.com; vitaly.osi...@gmail.com; de...@driverdev.osuosl.org Subject: Re: [PATCH] staging: rtl8712: Fix freeing

[PATCH] staging: rtl8712: Fix freeing ERR_PTR

2015-04-29 Thread Gujulan Elango, Hari Prasath (H.)
The return value of memdup_user is a pointer to errno.Freeing it will cause error.Hence set it to NULL before branching to free the pointer.smatch also raises the same warning. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 1

[PATCH] staging: iio: Check return value and handle error

2015-04-27 Thread Gujulan Elango, Hari Prasath (H.)
Check the return value of function and handle error condition appropriately. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/iio/accel/lis3l02dq_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b

[PATCH] staging: comedi: Return error if memory allocation fails

2015-04-27 Thread Gujulan Elango, Hari Prasath (H.)
Should return ENOMEM if memory allocation occurs.There is a wrong code jump here and this patch addresses this issue. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/comedi/comedi_fops.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff

[PATCH] staging: gsc_hdpi: Remove dead code

2015-04-24 Thread Gujulan Elango, Hari Prasath (H.)
This patch removes commented code from this driver. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/comedi/drivers/gsc_hpdi.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers

[PATCH] staging: lustre: Avoid creating two variables

2015-04-24 Thread Gujulan Elango, Hari Prasath (H.)
This patch avoids creating two variables in the final assembly output i.e. a string and a pointer to the string. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] staging: lustre: Avoid creating two variables

2015-04-24 Thread hari prasath
On 24 April 2015 at 15:46, Gujulan Elango, Hari Prasath (H.) hguju...@visteon.com wrote: This patch avoids creating two variables in the final assembly output i.e. a string and a pointer to the string. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging

[PATCH] staging: rtl8712e: use time_before() macro

2015-04-24 Thread Gujulan Elango, Hari Prasath (H.)
This patch replaces the condition check for time elapsed with a simplified time_before() macro Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] staging: rtl8192e: Use time_after macro

2015-04-24 Thread Gujulan Elango, Hari Prasath (H.)
This patch replaces a condition check for time elapsea with a simple time_after macro Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e

[PATCH] staging: lustre: declare file operations structure as static

2015-04-24 Thread Gujulan Elango, Hari Prasath (H.)
The fops structure is referenced only locally and hence could be made static Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/mdc

[PATCH] staging: comedi: Remove unwanted lines of code

2015-04-23 Thread Gujulan Elango, Hari Prasath (H.)
This patch removes a few lines of code retains the same functionality Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/comedi/drivers/cb_pcimdda.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 2/2] staging: emxx_udc: Remove dead code

2015-04-23 Thread Gujulan Elango, Hari Prasath (H.)
This patch removes few lines of commented code. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/emxx_udc/emxx_udc.c | 33 - 1 file changed, 33 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging

[PATCH 1/2] staging: emxx_udc : remove stray semicolon

2015-04-23 Thread Gujulan Elango, Hari Prasath (H.)
This patch removes a stray semicolon around closing brace of an if code block. Signed-off-by: Hari Prasath Gujulan Elango hguju...@visteon.com --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b

[PATCH] staging: i2o: Remove unwanted semicolon

2015-04-23 Thread Gujulan Elango, Hari Prasath (H.)
This patch removes unwanted semicolon around close braces of code blocks Signed-off-by: Hari Prasath hguju...@visteon.com --- drivers/staging/i2o/iop.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/i2o/iop.c b

<    1   2   3