From: Ian Campbell Subject: Re: [PATCH] make domain_create() return a proper error code Date: Mon, 3 Sep 2012 11:23:04 +0100 Message-ID: <1346667784.25864.24.camel@zakaz.uk.xensource.com> References: <504470FD0200007800098213@nat28.tlf.novell.com> <1346662056.27277.250.camel@zakaz.uk.xensource.com> <1346662807.27277.251.camel@zakaz.uk.xensource.com> <50448F850200007800098356@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50448F850200007800098356@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 2012-09-03 at 10:07 +0100, Jan Beulich wrote: > >>> On 03.09.12 at 11:00, Ian Campbell wrote: > >> > @@ -237,7 +238,7 @@ void __init start_xen(unsigned long boot > >> > > >> > /* Create initial domain 0. */ > >> > dom0 = domain_create(0, 0, 0); > >> > - if ( dom0 == NULL ) > >> > + if ( IS_ERR(dom0) ) > >> > printk("domain_create failed\n"); > >> > if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) > >> > >> You probably wanted to change this one too? > >> > >> I'm not sure the first message really buys much -- I'd be happy to nuke > >> it too. > > > > 8<------------------------ > > > > # HG changeset patch > > # User Ian Campbell > > # Date 1346662775 -3600 > > # Node ID c4e822e1b491bb7efa962b38fff6f007f01596b5 > > # Parent 241186e96a1ece42ad3bd14901b62d872f4abd9e > > arm: correctly check for error on dom0 allocation > > > > Drop the redundant printk > > > > Signed-off-by: Ian Campbell > > Thanks and (if you care) ack. Thanks, I think any ack is worthwhile. Applied. > > Jan > > > diff -r 241186e96a1e -r c4e822e1b491 xen/arch/arm/setup.c > > --- a/xen/arch/arm/setup.c Mon Sep 03 09:57:33 2012 +0100 > > +++ b/xen/arch/arm/setup.c Mon Sep 03 09:59:35 2012 +0100 > > @@ -238,9 +238,7 @@ void __init start_xen(unsigned long boot > > > > /* Create initial domain 0. */ > > dom0 = domain_create(0, 0, 0); > > - if ( IS_ERR(dom0) ) > > - printk("domain_create failed\n"); > > - if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) > > + if ( IS_ERR(dom0) || (alloc_dom0_vcpu0() == NULL) ) > > panic("Error creating domain 0\n"); > > > > dom0->is_privileged = 1; > > >