crypto: ccp - Clean up and exit correctly on allocation failure
authorGary R Hook <gary.hook@amd.com>
Wed, 31 Jul 2019 00:03:25 +0000 (00:03 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Aug 2019 05:11:39 +0000 (15:11 +1000)
commit114e2ccd9eff5859760cfa3bcbb707c3eda63fc3
treeba71b77688c003238a1b3838d1f3747fe91dfe2b
parent514838e920d06f5c2ba56e9656107dfcbbb90219
crypto: ccp - Clean up and exit correctly on allocation failure

Return and fail driver initialization if a DMA pool or coherent memory
can't be allocated. Be sure to clean up allocated memory.

Fixes: 4b394a232df7 ("crypto: ccp - Let a v5 CCP provide the same function as v3")

Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-dev-v5.c