Skip to content
Commit 6ed0993a authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Williamson
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarKirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent a121103c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment