aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2021-04-06 16:40:31 -0300
committerAlex Williamson <[email protected]>2021-04-07 15:39:18 -0600
commitfbd0e2b0c3d0b2eeaef471c9fe19ae5a7b2ee970 (patch)
tree37a1f34b243aca39f835e07edaa26c2cca1b26e9 /tools/perf/util/trace-event-scripting.c
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 <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Message-Id: <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions