cxl: Fix a memory leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 11 Jul 2022 19:14:48 +0000 (21:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:09:31 +0000 (11:09 +0200)
commitc2c7a29f99788e9e5dfe41d16868ea33da7cc235
tree19590c239c26d3e6a47813bf64244412081cf7c3
parent67a4874461422e633236a0286a01b483cd647113
cxl: Fix a memory leak in an error handling path

[ Upstream commit 3a15b45b5454da862376b5d69a4967f5c6fa1368 ]

A bitmap_zalloc() must be balanced by a corresponding bitmap_free() in the
error handling path of afu_allocate_irqs().

Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/ce5869418f5838187946eb6b11a52715a93ece3d.1657566849.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/cxl/irq.c