V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors
authorDan Carpenter <error27@gmail.com>
Fri, 4 Jun 2010 15:39:03 +0000 (12:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 18:28:59 +0000 (15:28 -0300)
commite252984c5279dde24fbd6d3efe7fe13dc642e714
tree71f9dd577ee9744fddf72a6baec80eb79a1a1b10
parentaac870a8770281c6ad619b538df77840b9513a0b
V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors

copy_to_user() returns the number of bytes remaining to be copied which
isn't the right thing to return here.  The comments say that these
functions in dvb_ca_en50221.c should return the number of bytes copied or
an error return.  I've changed it to return -EFAULT.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_ca_en50221.c