crypto: sa2ul - Fix leaks on failure paths with sa_dma_init()
authorSuman Anna <s-anna@ti.com>
Fri, 14 May 2021 16:12:42 +0000 (11:12 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 23 May 2021 00:52:40 +0000 (08:52 +0800)
commit4c0716ee1d973f6504d13f0e8d4d10350c85ad37
tree8e280ec7eef29e6c248e821981ca773a53b3557c
parent5c93a2ebc7ad85046fab23f8ac297fc3a86bc903
crypto: sa2ul - Fix leaks on failure paths with sa_dma_init()

The sa_dma_init() function doesn't release the requested dma channels
on all failure paths. Any failure in this function also ends up
leaking the dma pool created in sa_init_mem() in the sa_ul_probe()
function. Fix all of these issues.

Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Tero Kristo <kristo@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c