]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 13:19:02 +0000 (15:19 +0200)
commit31c1f265c53fc2f4cdbc3d30e9f924f94a45ff6e
tree4504d2ddc000db352ca4361366b224bc572bf611
parentf8e8fcedb182ec56cc2b70ae167e3dcaa01b0c87
powerpc: 8xx: fix a return value error in mpc8xx_pic_init

BugLink: https://bugs.launchpad.net/bugs/1971497
[ Upstream commit 3fd46e551f67f4303c3276a0d6cd20baf2d192c4 ]

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: cc76404feaed ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/powerpc/platforms/8xx/pic.c