Bill Davidsen wrote:
> Roel Kluin wrote:
>> kvm_get_exit_data() cannot return a NULL pointer.
>>
>> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
>> ---
>> 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?
Originally, we planed to allocate the exit_data dynamically, but considering some constrains, the exit_data is allocated statically, so the check for NULL is useless now.
Xiantao--
To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Free Online Dating]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[16.7MP]