hw/virtio: gracefully handle unset vhost_dev vdev
commitf20400ed0de62ba7682b864e270804ceb3df784a
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 28 Jul 2022 13:55:01 +0000 (28 14:55 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 17 Aug 2022 11:07:37 +0000 (17 07:07 -0400)
tree63f7b9a7db5d2cffa47077499dc4e5bd66310879
parent9a4b6a63aee885931622549c85669dcca03bed39
hw/virtio: gracefully handle unset vhost_dev vdev

I've noticed asserts firing because we query the status of vdev after
a vhost connection is closed down. Rather than faulting on the NULL
indirect just quietly reply false.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220728135503.1060062-3-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost.c