]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfio/virtio: Use guard() for bar_mutex in legacy I/O
authorAlex Williamson <alex.williamson@nvidia.com>
Tue, 14 Apr 2026 20:06:22 +0000 (14:06 -0600)
committerAlex Williamson <alex@shazbot.org>
Tue, 21 Apr 2026 18:01:21 +0000 (12:01 -0600)
commitb0eab97305ae97190a605117095d84f12ecef187
tree8a5960321cc2a383c02f5a390159a4f4628043d1
parentb5b268cb7868b598e53eeebd36174c8b27d4cd86
vfio/virtio: Use guard() for bar_mutex in legacy I/O

Convert the bar_mutex acquisition in virtiovf_issue_legacy_rw_cmd()
to use guard(), eliminating the out label and goto-based error paths
in favor of direct returns.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Alex Williamson <alex.williamson@nvidia.com>
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20260414200625.3601509-5-alex.williamson@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/virtio/legacy_io.c