Commit d3000463 authored by Parav Pandit's avatar Parav Pandit Committed by Alex Williamson

vfio/mdev: Avoid masking error code to EBUSY

Instead of masking return error to -EBUSY, return actual error
returned by the driver.
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 50732af3
......@@ -141,7 +141,7 @@ static int mdev_device_remove_ops(struct mdev_device *mdev, bool force_remove)
*/
ret = parent->ops->remove(mdev);
if (ret && !force_remove)
return -EBUSY;
return ret;
sysfs_remove_groups(&mdev->dev.kobj, parent->ops->mdev_attr_groups);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment