[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/pv: remove unnecessary use of goto out in construct_dom0()
commit c53aa9e655e7c615283e9e9637376c2b865e9dae Author: Jane Malalane <jane.malalane@xxxxxxxxxx> AuthorDate: Mon Aug 16 15:15:43 2021 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Aug 16 15:15:43 2021 +0200 x86/pv: remove unnecessary use of goto out in construct_dom0() elf_check_broken() only needs to be invoked after elf_xen_parse() and after elf_load_binary(). Suggested-by: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Jane Malalane <jane.malalane@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/pv/dom0_build.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index af47615b22..8712baccc1 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -400,8 +400,7 @@ int __init dom0_construct_pv(struct domain *d, if ( !compatible ) { printk("Mismatch between Xen and DOM0 kernel\n"); - rc = -EINVAL; - goto out; + return -EINVAL; } if ( parms.elf_notes[XEN_ELFNOTE_SUPPORTED_FEATURES].type != XEN_ENT_NONE ) @@ -409,8 +408,7 @@ int __init dom0_construct_pv(struct domain *d, if ( !pv_shim && !test_bit(XENFEAT_dom0, parms.f_supported) ) { printk("Kernel does not support Dom0 operation\n"); - rc = -EINVAL; - goto out; + return -EINVAL; } } @@ -607,8 +605,7 @@ int __init dom0_construct_pv(struct domain *d, : (v_start < HYPERVISOR_VIRT_END) && (v_end > HYPERVISOR_VIRT_START) ) { printk("DOM0 image overlaps with Xen private area.\n"); - rc = -EINVAL; - goto out; + return -EINVAL; } if ( compat ) @@ -753,8 +750,7 @@ int __init dom0_construct_pv(struct domain *d, mapcache_override_current(NULL); switch_cr3_cr4(current->arch.cr3, read_cr4()); printk("Invalid HYPERCALL_PAGE field in ELF notes.\n"); - rc = -EINVAL; - goto out; + return -EINVAL; } init_hypercall_page(d, _p(parms.virt_hypercall)); } -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |