vfio/mlx5: Refactor the SAVE callback to activate a work only upon an error
authorYishai Hadas <yishaih@nvidia.com>
Mon, 11 Sep 2023 09:38:50 +0000 (12:38 +0300)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 28 Sep 2023 19:07:29 +0000 (13:07 -0600)
commit34a64c8eac2380a28eeab191dc5bf4e0dbadf7c6
tree908c163cfb1f2aebcc70eb1179b86fe4d4fa026b
parent82470eba9df97a021309b360ec48342deaa3c7af
vfio/mlx5: Refactor the SAVE callback to activate a work only upon an error

Upon a successful SAVE callback there is no need to activate a work, all
the required stuff can be done directly.

As so, refactor the above flow to activate a work only upon an error.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230911093856.81910-4-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/mlx5/cmd.c