]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jan 2019 20:44:50 +0000 (12:44 -0800)
commit2494e64e8b66908ccd372d65a6592b712d2603c5
tree51c3ba3808a22fb2b16cc71816027e22ab493435
parenta32c85b4fad3ede9db6ad279c72f9c1e4cd95263
octeontx2-af: Fix a resource leak in an error handling path in 'cgx_probe()'

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: 40e7a91e7e51 ("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>
drivers/net/ethernet/marvell/octeontx2/af/cgx.c