vfio/mtty: Delete mdev_devices_list
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 25 Jun 2021 15:56:04 +0000 (12:56 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 28 Jun 2021 14:52:15 +0000 (08:52 -0600)
commit0dd1b7fc3e7d30802d5839f6bf8957023b437ad4
tree7ec72043a722cd983d6aba3b8586c7eb9370a8df
parent742b4c0d1efe7a7640ad17f1bbf696a1305f6495
vfio/mtty: Delete mdev_devices_list

Dan points out that an error case left things on this list. It is also
missing locking in available_instances_show().

Further study shows the list isn't needed at all, just store the total
ports in use in an atomic and delete the whole thing.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 09177ac91921 ("vfio/mtty: Convert to use vfio_register_group_dev()")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/0-v1-0bc56b362ca7+62-mtty_used_ports_jgg@nvidia.com
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mtty.c