From 7a720bf4019f0daff79779605456a7460b4e2d33 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 31 May 2009 18:05:05 -0300 Subject: saa7134-video.c: Fix poll return condition From: Figo.zhang In v2, when buf == NULL, it will goto err instead of returning "PULLERR" without unlocking. [mchehab@redhat.com: diff patch against v1 and v2 of saa7134-video.c: poll method lose race condition for capture video patch] Signed-off-by: Figo.zhang Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/saa7134-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index 26f1727e6..20b66cb8d 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1448,7 +1448,7 @@ video_poll(struct file *file, struct poll_table_struct *wait) } if (!buf) - rc = POLLERR; + goto err; poll_wait(file, &buf->done, wait); if (buf->state == VIDEOBUF_DONE || -- cgit v1.2.3