Received: from eggs.gnu.org ([2001:4830:134:3::10]:49606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCOuE-0002P0-OT for qemu-devel@nongnu.org; Tue, 16 Oct 2018 08:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCOuA-00022J-Nq for qemu-devel@nongnu.org; Tue, 16 Oct 2018 08:57:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51914) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCOuA-000203-BT for qemu-devel@nongnu.org; Tue, 16 Oct 2018 08:56:58 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9GCnjm2026933 for ; Tue, 16 Oct 2018 08:56:56 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n5g758qn3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Oct 2018 08:56:56 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Oct 2018 13:56:53 +0100 References: <20181016115817.14605-1-cohuck@redhat.com> From: Christian Borntraeger Date: Tue, 16 Oct 2018 14:56:48 +0200 MIME-Version: 1.0 In-Reply-To: <20181016115817.14605-1-cohuck@redhat.com> Content-Language: en-US Message-Id: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] s390x/vfio-ap: report correct error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , Tony Krowiak , Halil Pasic , Pierre Morel Cc: Alex Williamson , Peter Maydell , qemu-s390x@nongnu.org, qemu-devel@nongnu.org On 10/16/2018 01:58 PM, Cornelia Huck wrote: > If ioctl(..., VFIO_DEVICE_RESET) fails, we want to report errno > instead of ret (which is always -1 on error). > > Fixes Coverity issue CID 1396176. > > Reported-by: Peter Maydell > Signed-off-by: Cornelia Huck makes sense Reviewed-by: Christian Borntraeger > --- > hw/vfio/ap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c > index 3962bb74e5..65de952f44 100644 > --- a/hw/vfio/ap.c > +++ b/hw/vfio/ap.c > @@ -142,7 +142,7 @@ static void vfio_ap_reset(DeviceState *dev) > ret = ioctl(vapdev->vdev.fd, VFIO_DEVICE_RESET); > if (ret) { > error_report("%s: failed to reset %s device: %s", __func__, > - vapdev->vdev.name, strerror(ret)); > + vapdev->vdev.name, strerror(errno)); > } > } > >