vq_getchain() can return -1 if some descriptor(s) are invalid and prints
authorMarcelo Araujo <araujo@FreeBSD.org>
Tue, 15 May 2018 05:55:29 +0000 (05:55 +0000)
committerMarcelo Araujo <araujo@FreeBSD.org>
Tue, 15 May 2018 05:55:29 +0000 (05:55 +0000)
commitbc1019a23890b34e840ce349df0d73b452a890bb
treea8f0a3bc2e0cf272133c6bfdd31268c731e874e4
parent36ea2fe3bfd4dc0d90ebbc77e53e03b1edbaff08
vq_getchain() can return -1 if some descriptor(s) are invalid and prints
a diagnostic message. So we do a sanity checking on the return value
of vq_getchain().

Spotted by: gcc49
Reviewed by: avg
MFC after: 4 weeks
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D15388
usr.sbin/bhyve/pci_virtio_console.c