xen/irq: Propagate the error from init_one_desc_irq() in init_*_irq_data()
authorJulien Grall <jgrall@amazon.com>
Sat, 28 Nov 2020 11:36:42 +0000 (11:36 +0000)
committerJulien Grall <jgrall@amazon.com>
Wed, 20 Jan 2021 17:49:23 +0000 (17:49 +0000)
commit2bb32b809250923658dadff6a9eb66c0b8cbe403
treeb5f69cd887b5f12762325371b3b427afd3fcb6af
parent74cbc59b9455b75cf7202ee8edf4190dad05d0b9
xen/irq: Propagate the error from init_one_desc_irq() in init_*_irq_data()

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_{,local_}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@amazon.com>
Reviewed-by: Roger Paul Monné <roger.pau@citrix.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/irq.c
xen/arch/x86/irq.c