From nobody Mon Feb 9 17:22:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562676205; cv=none; d=zoho.com; s=zohoarc; b=U0lW9uMFzqAaDor+xM+Sv1SzNWEDi7kUCs3PNcQ7kwJFOt7M1uGDSkAHpxOFDs+ruWgLpwa7CInhHValJPpl+cspA6ckT+7LAfToFB5zWojVcXAyLFId7GRUaThFKilwSsEJ4pmYpbOTw4q/oua4xUJDP7952XemQ2vC1KO0YfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562676205; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=gNRTfFNEXKBd18wLxOjYeb+P3TsPQuN1D87obxkGVjY=; b=cOZ+kxo0pBnIwnOnmPlSnqJ4ZAgK8VS0PGxgc1ZBLHBrPPvMx2z5JoZFj7ICySLRqa6WcjNV0+nNVzudYhWx8Cb7UsnYenSOq2MJCdKqo2I44Y+4v6sTdFFIiUkdXfoGTP2ujC2Au+IFpPIzKwIR35MjO94GmO/JR5QtzWypI9E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562676205730698.1551762506683; Tue, 9 Jul 2019 05:43:25 -0700 (PDT) Received: from localhost ([::1]:49702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkpSu-0003K6-DB for importer@patchew.org; Tue, 09 Jul 2019 08:43:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60433) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkpLi-0004FG-58 for qemu-devel@nongnu.org; Tue, 09 Jul 2019 08:36:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkpLg-0006qH-IT for qemu-devel@nongnu.org; Tue, 09 Jul 2019 08:35:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43779) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkpLe-0006Xn-DJ; Tue, 09 Jul 2019 08:35:54 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E982830C1CD6; Tue, 9 Jul 2019 12:25:57 +0000 (UTC) Received: from localhost (unknown [10.40.205.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A183492D3B; Tue, 9 Jul 2019 12:25:52 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Date: Tue, 9 Jul 2019 14:25:43 +0200 Message-Id: <20190709122546.12373-2-cohuck@redhat.com> In-Reply-To: <20190709122546.12373-1-cohuck@redhat.com> References: <20190709122546.12373-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 09 Jul 2019 12:25:58 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , Alex Williamson , qemu-devel@nongnu.org, Eric Auger , qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Alex Williamson 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 Message-Id: <156209642116.14915.9598593247782519613.stgit@gimli.home> Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cornelia Huck --- 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(VFIOCCWDevi= ce *vcdev) { Error *err =3D NULL; =20 - 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); } =20 --=20 2.20.1