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)
commit3588c189e45aac69aa0deeedfd0d5de364030f37
treed00cc083c92083b07b6151132463ab2bac39a0e5
parent4d3bf6fb533461227ea532024b050cc31461e025
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: 37d79d059606 ("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