summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/mdev/mdev_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vfio/mdev/mdev_sysfs.c')
-rw-r--r--drivers/vfio/mdev/mdev_sysfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vfio/mdev/mdev_sysfs.c b/drivers/vfio/mdev/mdev_sysfs.c
index cbf94b8165ea..ffa3dcebf201 100644
--- a/drivers/vfio/mdev/mdev_sysfs.c
+++ b/drivers/vfio/mdev/mdev_sysfs.c
@@ -236,11 +236,9 @@ static ssize_t remove_store(struct device *dev, struct device_attribute *attr,
if (val && device_remove_file_self(dev, attr)) {
int ret;
- ret = mdev_device_remove(dev, false);
- if (ret) {
- device_create_file(dev, attr);
+ ret = mdev_device_remove(dev);
+ if (ret)
return ret;
- }
}
return count;