mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-08 16:36:58 +00:00
dm: clean up assert in virtio_audio.c
clean up assert from virtio_audio Tracked-On: #3301 Signed-off-by: Gao Junhao <junhao.gao@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
14a93f7475
commit
c265bd5552
@ -18,7 +18,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
#include <sysexits.h>
|
||||
|
||||
@ -368,7 +367,11 @@ virtio_audio_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
virtio_audio_kernel_stop(virt_audio);
|
||||
virtio_audio_kernel_reset(virt_audio);
|
||||
virt_audio->vbs_k.kstatus = VIRTIO_DEV_INITIAL;
|
||||
assert(virt_audio->vbs_k.audio_fd >= 0);
|
||||
if (virt_audio->vbs_k.audio_fd < 0) {
|
||||
WPRINTF(("virtio_audio: %s doesn't open!\n",
|
||||
vbs_k_audio_dev_path));
|
||||
return;
|
||||
}
|
||||
close(virt_audio->vbs_k.audio_fd);
|
||||
virt_audio->vbs_k.audio_fd = -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user