From 6f775a747949e6dd672f308146605173e151237e Mon Sep 17 00:00:00 2001 From: Diego Ongaro Date: Thu, 20 Nov 2008 02:32:28 -0600 Subject: [PATCH] PROC_GET_GUESTVM: push NULL warning out to callers --- sys/kern/kern_fkvm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_fkvm.c b/sys/kern/kern_fkvm.c index 9cc500341c9..591e0ebc6ca 100644 --- a/sys/kern/kern_fkvm.c +++ b/sys/kern/kern_fkvm.c @@ -152,8 +152,6 @@ PROC_GET_GUESTVM(struct proc *proc) { struct guestvm *guestvm; guestvm = proc->p_guestvm; - if (guestvm == NULL) - printf("PROC_GET_GUESTVM -> NULL\n"); return guestvm; } @@ -1409,8 +1407,10 @@ fkvm_set_user_mem_region(struct thread *td, struct fkvm_set_user_mem_region_args int error; guest_vm = PROC_GET_GUESTVM(td->td_proc); - if (guest_vm == NULL) + if (guest_vm == NULL) { + printf("PROC_GET_GUESTVM -> NULL\n"); return ENODEV; + } start = uap->guest_pa; end = uap->guest_pa + uap->size - 1; @@ -1489,8 +1489,10 @@ fkvm_unset_user_mem_region(struct thread *td, struct fkvm_unset_user_mem_region_ return ENODEV; guest_vm = PROC_GET_GUESTVM(td->td_proc); - if (guest_vm == NULL) + if (guest_vm == NULL) { + printf("PROC_GET_GUESTVM -> NULL\n"); return ENODEV; + } vm_offset_t start; vm_offset_t end; @@ -1786,8 +1788,10 @@ fkvm_create_vcpu(struct thread *td, struct fkvm_create_vcpu_args *uap) return ENODEV; guest_vm = PROC_GET_GUESTVM(td->td_proc); - if (guest_vm == NULL) + if (guest_vm == NULL) { + printf("PROC_GET_GUESTVM -> NULL\n"); return ENODEV; + } /* Allocate VCPU */ printf("fkvm_create_vcpu: td = %p\n", td); -- 2.11.4.GIT