[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/irq: Propagate the error from init_one_desc_irq() in init_irq_data()
Hi Roger, On 19/11/2020 15:11, Roger Pau Monné wrote: On Thu, Nov 19, 2020 at 02:54:34PM +0000, Julien Grall wrote:From: Julien Grall <jgrall@xxxxxxxxxx> init_one_desc_irq() can return an error if it is unable to allocate memory. While this is unlikely to happen during boot (called from init_irq_data()), it is better to harden the code by propagting the return value. Spotted by coverity. CID: 106529 Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>--- xen/arch/x86/irq.c | 7 ++++++-Fox x86: Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Thank you! 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 3877657a5277..279d221a2b85 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -88,7 +88,12 @@ static int __init init_irq_data(void) for ( irq = NR_LOCAL_IRQS; irq < NR_IRQS; irq++ ) { struct irq_desc *desc = irq_to_desc(irq); - init_one_irq_desc(desc); + int rc; + + rc = init_one_irq_desc(desc);You could init rc at definition. I need to send a new version, so I have merged the two line together. Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |