Skip to content

Commit

Permalink
V4L/DVB (6308): V4L: zc0301, remove bad usage of ERESTARTSYS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 3abff55 commit c3e2a8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/zc0301/zc0301_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit c3e2a8e

Please sign in to comment.