summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-vbi.h
diff options
context:
space:
mode:
authorAndy Walls <awalls@md.metrocast.net>2010-12-20 03:59:56 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 13:17:10 +0300
commitddda424999817fbc17adf9013feb066903382ede (patch)
tree1f75abf4d6a4814519b74fce450296cd495ba56e /drivers/media/video/ivtv/ivtv-vbi.h
parentb0c45686c8e8aecc7b0cd04d9b6af48d74418d53 (diff)
downloadlinux-ddda424999817fbc17adf9013feb066903382ede.tar.xz
[media] ivtv: Return EFAULT when copy_from_user() fails in ivtv_write_vbi_from_user()
If write() on a VBI device node fails due to a bad buffer pointer from userspace, we should notify the application properly with EFAULT, per the V4L2 API spec. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-vbi.h')
-rw-r--r--drivers/media/video/ivtv/ivtv-vbi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-vbi.h b/drivers/media/video/ivtv/ivtv-vbi.h
index eda38d0ad7ce..166dd0b75d0f 100644
--- a/drivers/media/video/ivtv/ivtv-vbi.h
+++ b/drivers/media/video/ivtv/ivtv-vbi.h
@@ -20,9 +20,10 @@
#ifndef IVTV_VBI_H
#define IVTV_VBI_H
-void ivtv_write_vbi_from_user(struct ivtv *itv,
- const struct v4l2_sliced_vbi_data __user *sliced,
- size_t count);
+ssize_t
+ivtv_write_vbi_from_user(struct ivtv *itv,
+ const struct v4l2_sliced_vbi_data __user *sliced,
+ size_t count);
void ivtv_process_vbi_data(struct ivtv *itv, struct ivtv_buffer *buf,
u64 pts_stamp, int streamtype);
int ivtv_used_line(struct ivtv *itv, int line, int field);