Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-21 Thread Dan Carpenter
On Wed, May 21, 2014 at 11:51:06PM +0200, Rickard Strandqvist wrote: > Hi > > Exactly as you say Dan, cppcheck has found that there is a null check > at some point while the others in this case are missed. So I'm not for > unnecessary checks. > But we can instead agree that I make a patch that wil

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-21 Thread Rickard Strandqvist
Hi Exactly as you say Dan, cppcheck has found that there is a null check at some point while the others in this case are missed. So I'm not for unnecessary checks. But we can instead agree that I make a patch that will remove all null checks padapter? Dan: I'll check on the scripts/checkpatch.pl

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-21 Thread Dan Carpenter
On Tue, May 20, 2014 at 04:57:56PM -0700, j...@joshtriplett.org wrote: > On Tue, May 20, 2014 at 06:26:51PM -0500, Larry Finger wrote: > > On 05/20/2014 04:31 PM, Rickard Strandqvist wrote: > > >There is otherwise a risk of a possible null pointer dereference. > > > > > >Was largely found by using

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-20 Thread josh
On Tue, May 20, 2014 at 06:26:51PM -0500, Larry Finger wrote: > On 05/20/2014 04:31 PM, Rickard Strandqvist wrote: > >There is otherwise a risk of a possible null pointer dereference. > > > >Was largely found by using a static code analysis program called cppcheck. > > > >Signed-off-by: Rickard Str

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-20 Thread Dan Carpenter
On Tue, May 20, 2014 at 11:31:16PM +0200, Rickard Strandqvist wrote: > + if (!padapter) { > + goto error_exit; > + } Btw, I forgot to mention this before but please run your patches through scripts/checkpatch.pl. regards, dan carpenter ___

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-20 Thread Larry Finger
On 05/20/2014 04:31 PM, Rickard Strandqvist wrote: There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 127 ++

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-20 Thread Dan Carpenter
On Tue, May 20, 2014 at 11:31:16PM +0200, Rickard Strandqvist wrote: > There is otherwise a risk of a possible null pointer dereference. > > Was largely found by using a static code analysis program called cppcheck. > "padapter" can't be NULL. Just remove the check. regards, dan carpenter ___

[PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-20 Thread Rickard Strandqvist
There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 127 ++- 1 file changed, 66 insertions(+), 6