qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Cornelia Huck" <cohuck@redhat.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	qemu-devel@nongnu.org, "Eric Auger" <eric.auger@redhat.com>,
	qemu-s390x@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value
Date: Tue,  9 Jul 2019 14:25:43 +0200	[thread overview]
Message-ID: <20190709122546.12373-2-cohuck@redhat.com> (raw)
In-Reply-To: <20190709122546.12373-1-cohuck@redhat.com>

From: Alex Williamson <alex.williamson@redhat.com>

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>
---
 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);
     }
 
-- 
2.20.1



  reply	other threads:[~2019-07-09 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
2019-07-09 12:25 ` Cornelia Huck [this message]
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 2/4] s390x/cpumodel: Set up CPU model for AQIC interception Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 3/4] s390: cpumodel: fix description for the new vector facility Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 4/4] s390x/tcg: move fallthrough annotation Cornelia Huck
2019-07-09 13:15 ` [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190709122546.12373-2-cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).