]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
octeontx2-af: Fix a resource leak in an error handling path in 'cgx_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 29 Dec 2018 16:42:22 +0000 (17:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2019 08:20:38 +0000 (09:20 +0100)
commit4b646199fafb59831c24fcbec015cf96cc73f2b8
tree46dd72bd2c97b87014b0673d12a3d7c81307dc9a
parent5b3f60ae75c3fe2f6a8402a7b0a80c5174f02f6d
octeontx2-af: Fix a resource leak in an error handling path in 'cgx_probe()'

[ Upstream commit 1492623e837fe7ca6296f7f5411328307e242771 ]

If an error occurs after the call to 'pci_alloc_irq_vectors()', we must
call 'pci_free_irq_vectors()' in order to avoid a resource leak.

The same sequence is already in place in the corresponding 'cgx_remove()'
function.

Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/octeontx2/af/cgx.c