[media] ivtv: Return EFAULT when copy_from_user() fails in ivtv_write_vbi_from_user()
authorAndy Walls <awalls@md.metrocast.net>
Mon, 20 Dec 2010 00:59:56 +0000 (21:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:17:10 +0000 (08:17 -0200)
commitddda424999817fbc17adf9013feb066903382ede
tree1f75abf4d6a4814519b74fce450296cd495ba56e
parentb0c45686c8e8aecc7b0cd04d9b6af48d74418d53
[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>
drivers/media/video/ivtv/ivtv-fileops.c
drivers/media/video/ivtv/ivtv-vbi.c
drivers/media/video/ivtv/ivtv-vbi.h