]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5d9ed8b14f0d13b5efa633ddd3dc7cad9aee1c3f
treebc13f84a0c618864b3802449517b0e096a9817bb
parentd5878a5fa8126acd5aa3f26e154f0a3da1ef9477
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