aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/ccw.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2019-07-02 13:41:34 -0600
committerCornelia Huck <cohuck@redhat.com>2019-07-08 12:10:37 +0200
commitf5cf94cdabd349eedc6d0fa69ba51ff4d84c2181 (patch)
tree32fee430166020fa2d0ce18675da7636ed8b3141 /hw/vfio/ccw.c
parent3a1acf5d47295d22ffdae0982a2fd808b802a7da (diff)
downloadqemu-f5cf94cdabd349eedc6d0fa69ba51ff4d84c2181.zip
qemu-f5cf94cdabd349eedc6d0fa69ba51ff4d84c2181.tar.gz
qemu-f5cf94cdabd349eedc6d0fa69ba51ff4d84c2181.tar.bz2
vfio-ccw: Test vfio_set_irq_signaling() return value
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>
Diffstat (limited to 'hw/vfio/ccw.c')
-rw-r--r--hw/vfio/ccw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 6d0296f..16f200e 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -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);
}