aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorJason Gunthorpe2021-04-06 16:40:31 -0300
committerAlex Williamson2021-04-07 15:39:18 -0600
commitfbd0e2b0c3d0b2eeaef471c9fe19ae5a7b2ee970 (patch)
tree37a1f34b243aca39f835e07edaa26c2cca1b26e9 /README
parent9a302449a58d45d0ef2aab686f64b35919bc604c (diff)
vfio/mdev: Reorganize mdev_device_create()
Once the memory for the struct mdev_device is allocated it should immediately be device_initialize()'d and filled in so that put_device() can always be used to undo the allocation. Place the mdev_get/put_parent() so that they are clearly protecting the mdev->parent pointer. Move the final put to the release function so that the lifetime rules are trivial to understand. Update the goto labels to follow the normal convention. Remove mdev_device_free() as the release function via device_put() is now usable in all cases. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Message-Id: <8-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions