From 109223eb261f2b8932eb472713aee9cfa091b338 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 9 Oct 2007 22:03:12 -0300 Subject: V4L: w9968cf, remove bad usage of ERESTARTSYS From: Jiri Slaby 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 Acked-by: Luca Risolia Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/w9968cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c index 606a5e222..96247da94 100644 --- a/linux/drivers/media/video/w9968cf.c +++ b/linux/drivers/media/video/w9968cf.c @@ -2687,7 +2687,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)); -- cgit v1.2.3