[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH] vfio-ccw: Test vfio_set_irq_signal
From: |
Auger Eric |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH] vfio-ccw: Test vfio_set_irq_signaling() return value |
Date: |
Wed, 3 Jul 2019 10:30:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi
On 7/2/19 9:41 PM, Alex Williamson wrote:
> 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 <address@hidden>
> ---
> 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);
> }
Reviewed-by: Eric Auger <address@hidden>
Thanks
Eric
>
>
>