]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: 8xx: fix a return value error in mpc8xx_pic_init
authorHangyu Hua <hbh25y@gmail.com>
Wed, 23 Feb 2022 07:02:23 +0000 (15:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:38 +0000 (14:23 +0200)
commitd7f0f62ab05c615d1894b031764808a1fc82a143
treecb102b7662baaf51271b6cb9873b4706313f770f
parent7a2751b0c5305e7f9fc8d31277d599121dd4e155
powerpc: 8xx: fix a return value error in mpc8xx_pic_init

[ Upstream commit 27bfcecdf7098af4d492244c97a6d160c04c65b6 ]

mpc8xx_pic_init() should return -ENOMEM instead of 0 when
irq_domain_add_linear() return NULL. This cause mpc8xx_pics_init to continue
executing even if mpc8xx_pic_host is NULL.

Fixes: e5fc64cb36c8 ("powerpc/8xx: Fix possible device node reference leak")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220223070223.26845-1-hbh25y@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/8xx/pic.c