diff options
author | Parav Pandit <parav@mellanox.com> | 2019-05-01 01:49:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 16:50:45 +0300 |
commit | 09dbc7e408dc9ade20255148ba0c0cd395acb31e (patch) | |
tree | 4d72bba8804264c91915506fe92de054cbdaa4f5 /drivers | |
parent | 5c5492ee3e8c2b1656da012112496b65da21c55f (diff) | |
download | linux-09dbc7e408dc9ade20255148ba0c0cd395acb31e.tar.xz |
vfio/mdev: Follow correct remove sequence
[ Upstream commit a6d6f4f160f76d840e59affe664b8d3159e23056 ]
mdev_remove_sysfs_files() should follow exact mirror sequence of a
create, similar to what is followed in error unwinding path of
mdev_create_sysfs_files().
Fixes: 6a62c1dfb5c7 ("vfio/mdev: Re-order sysfs attribute creation")
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vfio/mdev/mdev_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/mdev/mdev_sysfs.c b/drivers/vfio/mdev/mdev_sysfs.c index 249472f05509..e7770b511d03 100644 --- a/drivers/vfio/mdev/mdev_sysfs.c +++ b/drivers/vfio/mdev/mdev_sysfs.c @@ -280,7 +280,7 @@ type_link_failed: void mdev_remove_sysfs_files(struct device *dev, struct mdev_type *type) { + sysfs_remove_files(&dev->kobj, mdev_device_attrs); sysfs_remove_link(&dev->kobj, "mdev_type"); sysfs_remove_link(type->devices_kobj, dev_name(dev)); - sysfs_remove_files(&dev->kobj, mdev_device_attrs); } |