]> git.baikalelectronics.ru Git - kernel.git/commit
octeon_ep: Fix irq releasing in the error handling path of octep_request_irqs()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 17 May 2022 20:59:59 +0000 (22:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 May 2022 03:04:18 +0000 (20:04 -0700)
commit55b305303cd03d70d05d897ce6645137bbecb39e
treed00cc083c92083b07b6151132463ab2bac39a0e5
parenta9cbefa971208f3d47a2bcdde16e72ecf555ae54
octeon_ep: Fix irq releasing in the error handling path of octep_request_irqs()

When taken, the error handling path does not undo correctly what has
already been allocated.

Introduce a new loop index, 'j', in order to simplify the error handling
path and rewrite part of it.
It is now written with the same logic and intermediate variables used
when resources are allocated. This is much more straightforward.

Fixes: 5679af3ca2cb ("octeon_ep: add Tx/Rx processing and interrupt support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeon_ep/octep_main.c