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>
Mon, 21 Jun 2010 22:31:52 +0000 (15:31 -0700)
commitcf2d3fc9786ba005f9bde50a4e72a1d0b70472ff
tree661ac236928e9d2823d1bf30967ea321e020b008
parente6dc269b402d9fa1562276345931943683e16ebd
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