[PATCH] staging: binder: cleanup dereference of noderef expressions

2014-05-01 Thread Jerry Snitselaar
Clean up sparse warnings for cred struct dereference. Signed-off-by: Jerry Snitselaar d...@snitselaar.org --- drivers/staging/android/binder.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index

[PATCH] staging: comedi: fix coding style issues in comedi_fops.c

2014-05-01 Thread Raghavendra Ganiga
This is a patch to fix coding style warnings found by checkpatch.pl tool Signed-off-by: Raghavendra Chandra Ganiga ravi23gan...@gmail.com --- drivers/staging/comedi/comedi_fops.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/comedi/comedi_fops.c

[PATCH] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of rtw_set_key(). In case the requested algorithm is not supported by the driver, the function returns without enqueuing or freeing the already allocated command and parameter structs. Use a centralized exit path and make sure that all memory is freed

Re: [PATCH] staging: comedi: fix coding style issues in comedi_fops.c

2014-05-01 Thread Ian Abbott
On 2014/04/30 06:34 PM, Raghavendra Ganiga wrote: This is a patch to fix coding style warnings found by the checkpatch.pl tool Signed-off-by: Raghavendra Chandra Ganiga ravi23gan...@gmail.com --- drivers/staging/comedi/comedi_fops.c |6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH] staging: comedi: fix coding style issues in comedi_fops.c

2014-05-01 Thread Ian Abbott
On 2014/05/01 09:23 AM, Raghavendra Ganiga wrote: This is a patch to fix coding style warnings found by checkpatch.pl tool Signed-off-by: Raghavendra Chandra Ganiga ravi23gan...@gmail.com --- drivers/staging/comedi/comedi_fops.c |2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Dan Carpenter
On Thu, May 01, 2014 at 10:38:11AM +0200, Christian Engelmayer wrote: Fix a potential leak in the error path of rtw_set_key(). In case the requested algorithm is not supported by the driver, the function returns without enqueuing or freeing the already allocated command and parameter structs.

Re: [PATCH 00/32] staging: comedi: continue async command cleanup

2014-05-01 Thread Ian Abbott
On 2014-04-30 17:46, Hartley Sweeten wrote: On Wednesday, April 30, 2014 2:13 AM, Ian Abbott wrote: As a side node, I wonder if it's worth stripping out those `| I8254_BINARY` bits as it's basically 'OR'ing with zero anyway. I like the I8254_BINARY, it documents the mode that the counter is

[PATCH v2] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of rtw_set_key(). In case the requested algorithm is not supported by the driver, the function returns without enqueuing or freeing the already allocated command and parameter structs. Use a centralized exit path and make sure that all memory is freed

Re: [PATCH v2] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Dan Carpenter
On Thu, May 01, 2014 at 12:30:57PM +0200, Christian Engelmayer wrote: Fix a potential leak in the error path of rtw_set_key(). In case the requested algorithm is not supported by the driver, the function returns without enqueuing or freeing the already allocated command and parameter structs.

[PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch

[PATCH] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch

Re: [PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Mateusz Guzik
On Thu, May 01, 2014 at 01:57:27PM +0200, Christian Engelmayer wrote: Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. if (remainder_ielen 0) {

RE: [PATCH 00/32] staging: comedi: continue async command cleanup

2014-05-01 Thread Hartley Sweeten
On Thursday, May 01, 2014 2:46 AM, Ian Abbott wrote: On 2014-04-30 17:46, Hartley Sweeten wrote: On Wednesday, April 30, 2014 2:13 AM, Ian Abbott wrote: As a side node, I wonder if it's worth stripping out those `| I8254_BINARY` bits as it's basically 'OR'ing with zero anyway. I like the

[PATCH 2/2] staging: comedi: amplc_dio200_common: correct bound on counter mode

2014-05-01 Thread Ian Abbott
For the mode configured by the `INSN_CONFIG_SET_COUNTER_MODE` comedi instruction for the counter subdevice channels supported by this module, the upper bound should be `I8254_MODE5 | I8254_BCD` ((5 1) | 1) rather than `I8254_MODE5 | I8254_BINARY` ((5 1) | 0). Fix it. Reported-by: Hartley

[PATCH 1/2] staging: comedi: drivers: correct mode check for i8254_set_mode()

2014-05-01 Thread Ian Abbott
The upper bound check on the `mode` parameter of `i8254_set_mode()` and `i8254_mm_set_mode()` is incorrect. The `mode` parameter value consists of a mode number in the range 0 to 5 in bits 3..1 {represented by the constants `I8254_MODE0` (0 1) through to `I8254_MODE5` (2 1)} ORed with a

[PATCH 0/2] staging: comedi: correct upper bound check for 8254 mode

2014-05-01 Thread Ian Abbott
Hartley spotted a bug in the upper bound check for the counter 'mode' value in `i8254_set_mode()` (and the similar `i8254_mm_set_mode()` for memory-mapped registers). The same incorrect upper bound check was used in the amplc_dio200_common module which uses its own function to set the counter

RE: [PATCH 0/2] staging: comedi: correct upper bound check for 8254 mode

2014-05-01 Thread Hartley Sweeten
On Thursday, May 01, 2014 9:38 AM, Ian Abbott wrote: Hartley spotted a bug in the upper bound check for the counter 'mode' value in `i8254_set_mode()` (and the similar `i8254_mm_set_mode()` for memory-mapped registers). The same incorrect upper bound check was used in the amplc_dio200_common

Re: [PATCH 00/32] staging: comedi: continue async command cleanup

2014-05-01 Thread Ian Abbott
On 2014-05-01 17:31, Hartley Sweeten wrote: BTW, what's with all the NI_GPCT_* stuff in the main comedi.h header? These all seem pretty driver specific to ni_tio.c and ni_tiocmd.c. I don't understand why they are exposed in the user space header. Basically for the same reason the 8254 mode

Re: [PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
On Thu, 1 May 2014 14:22:17 +0200, Mateusz Guzik mgu...@redhat.com wrote: On Thu, May 01, 2014 at 01:57:27PM +0200, Christian Engelmayer wrote: Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon

Re: [PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Jes Sorensen
Christian Engelmayer cenge...@gmx.at writes: On Thu, 1 May 2014 14:22:17 +0200, Mateusz Guzik mgu...@redhat.com wrote: On Thu, May 01, 2014 at 01:57:27PM +0200, Christian Engelmayer wrote: Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory

[PATCH v2] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Move the affected input verification to the beginning of the function so that it may return directly without leaking already allocated memory. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer

[PATCH] staging: rtl8712: fix potential leaks in r8712_set_key()

2014-05-01 Thread Christian Engelmayer
Fix potential leaks in the error paths of r8712_set_key(). In case the algorithm specific checks fail, the function returns without enqueuing or freeing the already allocated command and parameter structs. Use a centralized exit path and make sure that all memory is freed correctly. Detected by

[PATCH v2] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Move the affected input verification to the beginning of the function so that it may return directly without leaking already allocated memory. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer