dataplane: fix shadowed return value

Propagate the error return value from get_indirect().  This bug was
introduced in commit 4d684832 ("vring: create a common function to parse
descriptors").

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2014-01-13 18:47:39 +08:00 committed by Kevin Wolf
parent d80ac658f2
commit 385c04d0b6

View File

@ -376,7 +376,7 @@ int vring_pop(VirtIODevice *vdev, Vring *vring,
barrier();
if (desc.flags & VRING_DESC_F_INDIRECT) {
int ret = get_indirect(vring, elem, &desc);
ret = get_indirect(vring, elem, &desc);
if (ret < 0) {
goto out;
}