[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] s390x/vfio-ap: report correct error
From: |
Christian Borntraeger |
Subject: |
Re: [Qemu-devel] [PATCH] s390x/vfio-ap: report correct error |
Date: |
Tue, 16 Oct 2018 14:56:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
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 <address@hidden>
> Signed-off-by: Cornelia Huck <address@hidden>
makes sense
Reviewed-by: Christian Borntraeger <address@hidden>
> ---
> 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));
> }
> }
>
>