diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-01-07 09:27:49 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2017-01-11 12:06:35 -0700 |
commit | 6ed0993a0b859ce62edf2930ded683e452286d39 (patch) | |
tree | d887337ec8e4b492163467fc95ef5672d35160aa /lib/random32.c | |
parent | a121103c922847ba5010819a3f250f1f7fc84ab8 (diff) |
vfio-mdev: return -EFAULT if copy_to_user() fails
The copy_to_user() function returns the number of bytes which it wasn't
able to copy but we want to return a negative error code.
Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'lib/random32.c')
0 files changed, 0 insertions, 0 deletions