s390x/vfio-ap: report correct error
commitab17b1fc75d9b961bf88a109b74069a383eba49f
authorCornelia Huck <cohuck@redhat.com>
Tue, 16 Oct 2018 11:51:54 +0000 (16 13:51 +0200)
committerCornelia Huck <cohuck@redhat.com>
Mon, 5 Nov 2018 08:55:01 +0000 (5 09:55 +0100)
treeaee4f4503a70f48c438762428f73bfa4fcbd3985
parent7d56239f159afc2e7bd42623947e56ba48f37836
s390x/vfio-ap: report correct error

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 <peter.maydell@linaro.org>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/vfio/ap.c