From 429302c72a6bcf38131fd9a5f5806bb2f2d56cb7 Mon Sep 17 00:00:00 2001 From: "Li, Fei1" Date: Mon, 12 Mar 2018 21:53:29 +0800 Subject: [PATCH] minor fix on get_ptdev_info Signed-off-by: Li, Fei1 --- hypervisor/arch/x86/assign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/assign.c b/hypervisor/arch/x86/assign.c index a6b9f2b00..5ac09be1b 100644 --- a/hypervisor/arch/x86/assign.c +++ b/hypervisor/arch/x86/assign.c @@ -967,7 +967,7 @@ int get_ptdev_info(char *str, int str_max) uint64_t dest; bool lvl_tm; int pin, vpin, bdf, vbdf; - struct list_head *pos = NULL, *vm_pos; + struct list_head *pos, *vm_pos; struct vm *vm; len = snprintf(str, size, @@ -977,7 +977,7 @@ int get_ptdev_info(char *str, int str_max) spinlock_obtain(&vm_list_lock); list_for_each(vm_pos, &vm_list) { - vm = list_entry(pos, struct vm, list); + vm = list_entry(vm_pos, struct vm, list); spinlock_obtain(&vm->ptdev_lock); list_for_each(pos, &vm->ptdev_list) { entry = list_entry(pos, struct ptdev_remapping_info,