diff options
| author | Eric Auger <eric.auger@redhat.com> | 2016-10-17 10:58:00 -0600 |
|---|---|---|
| committer | Alex Williamson <alex.williamson@redhat.com> | 2016-10-17 10:58:00 -0600 |
| commit | 0d84f47bff2f98d0cea5fb27e9b62225ccebd70a (patch) | |
| tree | a1d1ff552b5d761eb5be188bc5f448501fe955ff /hw/vfio/platform.c | |
| parent | 5ff7419d4c7706fc3f625c0fd48cae191d2cecbc (diff) | |
| download | focaccia-qemu-0d84f47bff2f98d0cea5fb27e9b62225ccebd70a.tar.gz focaccia-qemu-0d84f47bff2f98d0cea5fb27e9b62225ccebd70a.zip | |
vfio/platform: fix a wrong returned value in vfio_populate_device
In case the vfio_init_intp fails we currently do not return an error value. This patch fixes the bug. The returned value is not explicit but in practice the error object is the one used to report the error to the end-user and the actual returned error value is not used. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/platform.c')
| -rw-r--r-- | hw/vfio/platform.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 1a35da04c3..484e31f233 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -508,6 +508,7 @@ static int vfio_populate_device(VFIODevice *vbasedev, Error **errp) irq.flags); intp = vfio_init_intp(vbasedev, irq, errp); if (!intp) { + ret = -1; goto irq_err; } } |