From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Prabhakar Lad <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH] V4L2: fix subdevice matching in asynchronous probing
Date: Mon, 22 Apr 2013 12:34:53 +0200 [thread overview]
Message-ID: <4168926.UulQla8EqY@avalon> (raw)
In-Reply-To: <Pine.LNX.4.64.1304191640010.591@axis700.grange>
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@gmail.com>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> 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
next prev parent reply other threads:[~2013-04-22 10:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 14:41 [PATCH] V4L2: fix subdevice matching in asynchronous probing Guennadi Liakhovetski
2013-04-22 10:34 ` Laurent Pinchart [this message]
2013-04-22 10:43 ` Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4168926.UulQla8EqY@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-media@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.