summaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 5891bad97a7e..17048d9575e3 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3772,7 +3772,7 @@ int kvm_vcpu_yield_to(struct kvm_vcpu *target)
{
struct pid *pid;
struct task_struct *task = NULL;
- int ret = 0;
+ int ret;
rcu_read_lock();
pid = rcu_dereference(target->pid);
@@ -3780,7 +3780,7 @@ int kvm_vcpu_yield_to(struct kvm_vcpu *target)
task = get_pid_task(pid, PIDTYPE_PID);
rcu_read_unlock();
if (!task)
- return ret;
+ return 0;
ret = yield_to(task, 1);
put_task_struct(task);