crypto: cavium/nitrox - Fix an error rhandling path in 'nitrox_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 5 Jun 2021 12:55:56 +0000 (14:55 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Jun 2021 07:08:06 +0000 (15:08 +0800)
commit0dc64297c8ac98503a7c7621b3c78e151deb75b6
tree7432f5aaf802c9cae62ae62f5d13968b05a690ab
parent5cd259ca5d466f65ffd21e2e2fa00fb648a8c555
crypto: cavium/nitrox - Fix an error rhandling path in 'nitrox_probe()'

If an error occurs after a successful 'ioremap()' call, it must be undone
by a corresponding 'iounmap()' call, as already done in the remove
function.
Add a 'pf_sw_fail' label in the error handling path and add the missing
'iounmap()'.

While at it, also add a 'flr_fail' label in the error handling path and use
it to avoid some code duplication.

Fixes: 14fa93cdcd9b ("crypto: cavium - Add support for CNN55XX adapters.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/nitrox/nitrox_main.c