Skip to content

Commit

Permalink
vfio-ccw: Test vfio_set_irq_signaling() return value
Browse files Browse the repository at this point in the history
Coverity doesn't like that most callers of vfio_set_irq_signaling() check
the return value and doesn't understand the equivalence of testing the
error pointer instead.  Test the return value consistently.

Reported-by: Coverity (CID 1402783)
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Message-Id: <156209642116.14915.9598593247782519613.stgit@gimli.home>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
  • Loading branch information
awilliam authored and cohuck committed Jul 8, 2019
1 parent 3a1acf5 commit f5cf94c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hw/vfio/ccw.c
Expand Up @@ -327,9 +327,8 @@ static void vfio_ccw_unregister_io_notifier(VFIOCCWDevice *vcdev)
{
Error *err = NULL;

vfio_set_irq_signaling(&vcdev->vdev, VFIO_CCW_IO_IRQ_INDEX, 0,
VFIO_IRQ_SET_ACTION_TRIGGER, -1, &err);
if (err) {
if (vfio_set_irq_signaling(&vcdev->vdev, VFIO_CCW_IO_IRQ_INDEX, 0,
VFIO_IRQ_SET_ACTION_TRIGGER, -1, &err)) {
error_reportf_err(err, VFIO_MSG_PREFIX, vcdev->vdev.name);
}

Expand Down

0 comments on commit f5cf94c

Please sign in to comment.