vhost-vdpa: stick to -errno error return convention
commit3631151b3e3c53ce70c370e68241e9876e2dbb3a
authorRoman Kagan <rvkagan@yandex-team.ru>
Thu, 11 Nov 2021 15:33:51 +0000 (11 18:33 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 7 Jan 2022 10:19:55 +0000 (7 05:19 -0500)
tree20eb5180a1a1c7f97fe3f4b9b5a69b3a94795f6d
parent2d88d9c65cc9680ff33cf8cc0b71ab1532e2f394
vhost-vdpa: stick to -errno error return convention

Almost all VhostOps methods in vdpa_ops follow the convention of
returning negated errno on error.

Adjust the few that don't.  To that end, rework vhost_vdpa_add_status to
check if setting of the requested status bits has succeeded and return
the respective error code it hasn't, and propagate the error codes
wherever it's appropriate.

Signed-off-by: Roman Kagan <rvkagan@yandex-team.ru>
Message-Id: <20211111153354.18807-8-rvkagan@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-vdpa.c