Staging: batman-adv: return -EFAULT on copy_to_user errors
authorDan Carpenter <error27@gmail.com>
Sun, 6 Jun 2010 19:03:04 +0000 (21:03 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Jun 2010 15:18:14 +0000 (08:18 -0700)
commit25477f2398f39a35f110e02f6c7d8dd1023c47c1
treead312a0b0e687624d72cc035ae09c265fa8c4072
parentf2102d31de1f0ddb9ced62d65d2ed89a5149ea39
Staging: batman-adv: return -EFAULT on copy_to_user errors

copy_to_user() returns the number of bites remaining but we want to
return a negative error code here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/device.c