staging: pi433: return -EFAULT if copy_to_user() fails
authordan.carpenter@oracle.com <dan.carpenter@oracle.com>
Wed, 19 Jul 2017 09:51:40 +0000 (12:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Jul 2017 23:55:40 +0000 (16:55 -0700)
commit39ae5f1e4b86333b2ca97a278a93640d61fcf77d
tree20f26761cbd7d6d441b6b29fa02fbb74a8c245ac
parenta7b1ba23556215952099274a0f008643de832f70
staging: pi433: return -EFAULT if copy_to_user() fails

copy_to_user() to user returns the number of bytes that weren't copied,
but we should be returning -EFAULT to the user.

Fixes: 874bcba65f9a ("staging: pi433: New driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/pi433_if.c