qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vfio-ccw: Test vfio_set_irq_signaling() return value
@ 2019-07-02 19:41 Alex Williamson
  2019-07-03  1:09 ` no-reply
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Alex Williamson @ 2019-07-02 19:41 UTC (permalink / raw)
  To: cohuck, farman, alifm; +Cc: eric.auger, qemu-s390x, qemu-devel

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>
---
 hw/vfio/ccw.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 6d0296fe4d9c..16f200e6fe6a 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);
     }
 



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-03 10:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-02 19:41 [Qemu-devel] [PATCH] vfio-ccw: Test vfio_set_irq_signaling() return value Alex Williamson
2019-07-03  1:09 ` no-reply
2019-07-03  8:30 ` Auger Eric
2019-07-03  8:41 ` Cornelia Huck
2019-07-03  8:51 ` Philippe Mathieu-Daudé
2019-07-03 10:49 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).