Re: [PATCH 1/1] usb: host: ehci-spear: Fix potential NULL pointer dereferencing

2013-05-22 Thread Sachin Kamat
On 22 May 2013 19:50, Alan Stern wrote: > On Wed, 22 May 2013, Sachin Kamat wrote: > >> 'hcd' is dereferenced before NULL check. Move the assignment after >> the check to avoid potential NULL pointer dereferencing error. > > Since the pointer in question can never be NULL, you should remove the >

Re: [PATCH 1/1] usb: host: ehci-spear: Fix potential NULL pointer dereferencing

2013-05-22 Thread Alan Stern
On Wed, 22 May 2013, Sachin Kamat wrote: > 'hcd' is dereferenced before NULL check. Move the assignment after > the check to avoid potential NULL pointer dereferencing error. Since the pointer in question can never be NULL, you should remove the check entirely instead of moving the reference. F

Re: [PATCH 1/1] usb: host: ehci-spear: Fix potential NULL pointer dereferencing

2013-05-21 Thread Viresh Kumar
On 22 May 2013 09:05, Sachin Kamat wrote: > 'hcd' is dereferenced before NULL check. Move the assignment after > the check to avoid potential NULL pointer dereferencing error. > > Signed-off-by: Sachin Kamat > Cc: Viresh Kumar > --- > drivers/usb/host/ehci-spear.c |5 - > 1 file changed

[PATCH 1/1] usb: host: ehci-spear: Fix potential NULL pointer dereferencing

2013-05-21 Thread Sachin Kamat
'hcd' is dereferenced before NULL check. Move the assignment after the check to avoid potential NULL pointer dereferencing error. Signed-off-by: Sachin Kamat Cc: Viresh Kumar --- drivers/usb/host/ehci-spear.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb