Commit 0f0412c1 authored by Roel Kluin's avatar Roel Kluin Committed by Marcelo Tosatti

KVM: ia64: remove redundant kvm_get_exit_data() NULL tests

kvm_get_exit_data() cannot return a NULL pointer.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 4610c83c
...@@ -75,7 +75,7 @@ static void set_pal_result(struct kvm_vcpu *vcpu, ...@@ -75,7 +75,7 @@ static void set_pal_result(struct kvm_vcpu *vcpu,
struct exit_ctl_data *p; struct exit_ctl_data *p;
p = kvm_get_exit_data(vcpu); p = kvm_get_exit_data(vcpu);
if (p && p->exit_reason == EXIT_REASON_PAL_CALL) { if (p->exit_reason == EXIT_REASON_PAL_CALL) {
p->u.pal_data.ret = result; p->u.pal_data.ret = result;
return ; return ;
} }
...@@ -87,7 +87,7 @@ static void set_sal_result(struct kvm_vcpu *vcpu, ...@@ -87,7 +87,7 @@ static void set_sal_result(struct kvm_vcpu *vcpu,
struct exit_ctl_data *p; struct exit_ctl_data *p;
p = kvm_get_exit_data(vcpu); p = kvm_get_exit_data(vcpu);
if (p && p->exit_reason == EXIT_REASON_SAL_CALL) { if (p->exit_reason == EXIT_REASON_SAL_CALL) {
p->u.sal_data.ret = result; p->u.sal_data.ret = result;
return ; return ;
} }
...@@ -322,7 +322,7 @@ static u64 kvm_get_pal_call_index(struct kvm_vcpu *vcpu) ...@@ -322,7 +322,7 @@ static u64 kvm_get_pal_call_index(struct kvm_vcpu *vcpu)
struct exit_ctl_data *p; struct exit_ctl_data *p;
p = kvm_get_exit_data(vcpu); p = kvm_get_exit_data(vcpu);
if (p && (p->exit_reason == EXIT_REASON_PAL_CALL)) if (p->exit_reason == EXIT_REASON_PAL_CALL)
index = p->u.pal_data.gr28; index = p->u.pal_data.gr28;
return index; return index;
...@@ -646,18 +646,16 @@ static void kvm_get_sal_call_data(struct kvm_vcpu *vcpu, u64 *in0, u64 *in1, ...@@ -646,18 +646,16 @@ static void kvm_get_sal_call_data(struct kvm_vcpu *vcpu, u64 *in0, u64 *in1,
p = kvm_get_exit_data(vcpu); p = kvm_get_exit_data(vcpu);
if (p) { if (p->exit_reason == EXIT_REASON_SAL_CALL) {
if (p->exit_reason == EXIT_REASON_SAL_CALL) { *in0 = p->u.sal_data.in0;
*in0 = p->u.sal_data.in0; *in1 = p->u.sal_data.in1;
*in1 = p->u.sal_data.in1; *in2 = p->u.sal_data.in2;
*in2 = p->u.sal_data.in2; *in3 = p->u.sal_data.in3;
*in3 = p->u.sal_data.in3; *in4 = p->u.sal_data.in4;
*in4 = p->u.sal_data.in4; *in5 = p->u.sal_data.in5;
*in5 = p->u.sal_data.in5; *in6 = p->u.sal_data.in6;
*in6 = p->u.sal_data.in6; *in7 = p->u.sal_data.in7;
*in7 = p->u.sal_data.in7; return ;
return ;
}
} }
*in0 = 0; *in0 = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment