commit | 6ed0993a0b859ce62edf2930ded683e452286d39 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Sat Jan 07 09:27:49 2017 +0300 |
committer | Alex Williamson <alex.williamson@redhat.com> | Wed Jan 11 12:06:35 2017 -0700 |
tree | d887337ec8e4b492163467fc95ef5672d35160aa | |
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>