]> 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)
commit5dec6b10df2080a3ccb8c6ac41a5fd8265c90105
treed00cc083c92083b07b6151132463ab2bac39a0e5
parent76dfe15d7c2c044355b88de0c4edd24b35b2be58
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: 2c41ea2e7824 ("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