From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Davidsen Date: Sat, 16 Jan 2010 18:29:05 +0000 Subject: Re: [PATCH] KVM: remove redundant NULL tests Message-Id: <4B520571.7050502@tmr.com> List-Id: References: <4B4F4EF6.2050202@gmail.com> In-Reply-To: <4B4F4EF6.2050202@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ia64@vger.kernel.org Roel Kluin wrote: > kvm_get_exit_data() cannot return a NULL pointer. > > Signed-off-by: Roel Kluin > --- > 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 "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot