Re: [PATCH] VIDEO: ivtvfb, remove unneeded NULL test

2010-07-05 Thread Andy Walls
On Mon, 2010-07-05 at 09:10 +0200, Jiri Slaby wrote: > On 07/04/2010 03:22 PM, Andy Walls wrote: > > On Sun, 2010-07-04 at 09:24 +0200, Jiri Slaby wrote: > >> On 07/04/2010 06:11 AM, Andy Walls wrote: > > There are windows of time where a struct device * will exist for a card > > in the ivtv drive

Re: [PATCH] VIDEO: ivtvfb, remove unneeded NULL test

2010-07-05 Thread Jiri Slaby
On 07/04/2010 03:22 PM, Andy Walls wrote: > On Sun, 2010-07-04 at 09:24 +0200, Jiri Slaby wrote: >> On 07/04/2010 06:11 AM, Andy Walls wrote: >>> --- a/drivers/media/video/ivtv/ivtvfb.c >>> +++ b/drivers/media/video/ivtv/ivtvfb.c >>> @@ -1201,9 +1201,14 @@ static int ivtvfb_init_card(struct ivtv *i

Re: [PATCH] VIDEO: ivtvfb, remove unneeded NULL test

2010-07-04 Thread Andy Walls
On Sun, 2010-07-04 at 09:24 +0200, Jiri Slaby wrote: > On 07/04/2010 06:11 AM, Andy Walls wrote: > > You missed an identical instance of the useless test 10 lines prior in > > ivtvfb_callback_init(). :) > > Ah, thank you for pointing out. Find my comment below. > > > --- a/drivers/media/video/ivt

Re: [PATCH] VIDEO: ivtvfb, remove unneeded NULL test

2010-07-04 Thread Jiri Slaby
On 07/04/2010 06:11 AM, Andy Walls wrote: > You missed an identical instance of the useless test 10 lines prior in > ivtvfb_callback_init(). :) Ah, thank you for pointing out. Find my comment below. > --- a/drivers/media/video/ivtv/ivtvfb.c > +++ b/drivers/media/video/ivtv/ivtvfb.c > @@ -1201,9 +

Re: [PATCH] VIDEO: ivtvfb, remove unneeded NULL test

2010-07-03 Thread Andy Walls
On Tue, 2010-06-22 at 13:41 +0200, Jiri Slaby wrote: > Stanse found that in ivtvfb_callback_cleanup there is an unneeded test > for itv being NULL. But itv is initialized as container_of with > non-zero offset, so it is never NULL (even if v4l2_dev is). This was > found because itv is dereferenced

[PATCH] VIDEO: ivtvfb, remove unneeded NULL test

2010-06-22 Thread Jiri Slaby
Stanse found that in ivtvfb_callback_cleanup there is an unneeded test for itv being NULL. But itv is initialized as container_of with non-zero offset, so it is never NULL (even if v4l2_dev is). This was found because itv is dereferenced earlier than the test. Signed-off-by: Jiri Slaby Cc: Andy W