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: 9d1a546c ("docs: Sample driver to demonstrate how to use Mediated device framework.") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NKirti Wankhede <kwankhede@nvidia.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
Showing
想要评论请 注册 或 登录