V4L/DVB (6308): V4L: zc0301, remove bad usage of ERESTARTSYS
authorJiri Slaby <jirislaby@gmail.com>
Wed, 10 Oct 2007 01:15:27 +0000 (22:15 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 03:03:25 +0000 (00:03 -0300)
zc0301, 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/zc0301/zc0301_core.c

index 35138c5..08a93c3 100644 (file)
@@ -655,7 +655,7 @@ static int zc0301_open(struct inode* inode, struct file* filp)
        int err = 0;
 
        if (!down_read_trylock(&zc0301_dev_lock))
-               return -ERESTARTSYS;
+               return -EAGAIN;
 
        cam = video_get_drvdata(video_devdata(filp));