Re: [PATCH] KVM: remove redundant NULL tests
Bill Davidsen <[email protected]>
| Newsgroups | org.kernel.vger.kvm-ia64,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Roel Kluin wrote: > kvm_get_exit_data() cannot return a NULL pointer. > > Signed-off-by: Roel Kluin <[email protected]> > --- > arch/ia64/kvm/kvm_fw.c | 28 +++++++++++++--------------- > 1 files changed, 13 insertions(+), 15 deletions(-) > > diff --git a/arch/ia64/kvm/kvm_fw.c b/arch/ia64/kvm/kvm_fw.c > index e4b8231..cb548ee 100644 > --- a/arch/ia64/kvm/kvm_fw.c > +++ b/arch/ia64/kvm/kvm_fw.c > @@ -75,7 +75,7 @@ static void set_pal_result(struct kvm_vcpu *vcpu, > struct exit_ctl_data *p; > > 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; > return ; > } [___etc___] Clearly the original author thought that there was a path where kvm_exit_data could return a NULL pointer, was that ever possible? -- Bill Davidsen <[email protected]> "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot