|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 16/38] arm/p2m: Add HVMOP_altp2m_set_domain_state
Hello Sergej, On 16/08/16 23:16, Sergej Proskurin wrote: This could be simplified with just return -ENOMEM. + + p2m->p2m_class = p2m_alternate; + + /* Initialize the new altp2m view. */ + rc = p2m_init_one(d, p2m); + if ( rc ) + goto err; + + p2m->access_required = false; + _atomic_set(&p2m->active_vcpus, 0); the p2m is initialized to 0, so both access_required and active_vcpus initialization is not necessary. + + d->arch.altp2m_p2m[idx] = p2m; + + return rc; + +err: + if ( p2m ) + xfree(p2m); xfree is able to handle NULL pointer. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |