powerpc/xive: Add some error handling code to 'xive_spapr_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 1 Feb 2022 12:31:16 +0000 (13:31 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Feb 2022 11:36:59 +0000 (22:36 +1100)
commite414e2938ee26e734f19e92a60cd090ebaff37e6
treebc13f84a0c618864b3802449517b0e096a9817bb
parent0198322379c25215b2778482bf1221743a76e2b5
powerpc/xive: Add some error handling code to 'xive_spapr_init()'

'xive_irq_bitmap_add()' can return -ENOMEM.
In this case, we should free the memory already allocated and return
'false' to the caller.

Also add an error path which undoes the 'tima = ioremap(...)'

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/564998101804886b151235c8a9f93020923bfd2c.1643718324.git.christophe.jaillet@wanadoo.fr
arch/powerpc/sysdev/xive/spapr.c