Hi Guennadi, On Friday 19 April 2013 16:41:02 Guennadi Liakhovetski wrote: > A wrapped list iterating loop hasn't been correctly recognised in > v4l2_async_belongs(), which led to false positives. Fix the bug by > verifying the loop termination condition. > > Reported-by: Prabhakar Lad <prabhakar.csengg@xxxxxxxxx> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx> > --- > > Prabhakar, please, check, whether this fixes your problem. > > drivers/media/v4l2-core/v4l2-async.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/media/v4l2-core/v4l2-async.c > b/drivers/media/v4l2-core/v4l2-async.c index 5d6b428..5631944 100644 > --- a/drivers/media/v4l2-core/v4l2-async.c > +++ b/drivers/media/v4l2-core/v4l2-async.c > @@ -76,6 +76,10 @@ static struct v4l2_async_subdev > *v4l2_async_belongs(struct v4l2_async_notifier * > break; > } > > + if (&asd->list == ¬ifier->waiting) > + /* Wrapped - no match found */ > + return NULL; > + > return asd; > } What about just if (match && match(sd->dev, hw)) return asd; } return NULL; } That's a bit simpler. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html