]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Fix some memory leaks in the error handling path of 'cgx_lmac_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 4 Sep 2021 07:34:51 +0000 (09:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Sep 2021 12:07:00 +0000 (13:07 +0100)
commitda304d3d7384162d0ea3bb36bb55e9555f6b69d1
treeee4c16101eaa1806c7d4f234d9a29feb29ba24f2
parentd6d54e99042ccb83e5cc291e6e75a08628d6dc02
octeontx2-af: Fix some memory leaks in the error handling path of 'cgx_lmac_init()'

Memory allocated before 'lmac' is stored in 'cgx->lmac_idmap[]' must be
freed explicitly. Otherwise, in case of error, it will leak.

Rename the 'err_irq' label to better describe what is done at this place in
the error handling path.

Fixes: 863cd80f6820 ("octeontx2-af: DMAC filter support in MAC block")
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