]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6307): V4L: w9968cf, remove bad usage of ERESTARTSYS
authorJiri Slaby <jirislaby@gmail.com>
Wed, 10 Oct 2007 01:03:12 +0000 (22:03 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 03:03:25 +0000 (00:03 -0300)
w9968cf, remove bad usage of ERESTARTSYS

down_read_trylock can't be interrupted and so ERESTARTSYS would reach
userspace, which is not permitted. Change it to EAGAIN

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/w9968cf.c

index 77599f228b618f42de8b3c37acffa774690a49b0..5a1b5f5a7d463e11cab98c6197b38646e18101f7 100644 (file)
@@ -2679,7 +2679,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp)
 
        /* This the only safe way to prevent race conditions with disconnect */
        if (!down_read_trylock(&w9968cf_disconnect))
-               return -ERESTARTSYS;
+               return -EAGAIN;
 
        cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));