linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto:ccp - Return from init on allocation failure
@ 2019-07-30 18:28 Hook, Gary
  2019-07-31 16:58 ` Gary R Hook
  0 siblings, 1 reply; 2+ messages in thread
From: Hook, Gary @ 2019-07-30 18:28 UTC (permalink / raw)
  To: linux-crypto@vger.kernel.org
  Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
	Lendacky, Thomas, Hook, Gary

Return and fail driver initialization if a DMA pool can't be
allocated.

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

Signed-off-by: Gary R Hook <gary.hook@amd.com>
---
 drivers/crypto/ccp/ccp-dev-v5.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index f146b51a23a5..3c0f0d0c3153 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -803,6 +803,7 @@ static int ccp5_init(struct ccp_device *ccp)
 		if (!dma_pool) {
 			dev_err(dev, "unable to allocate dma pool\n");
 			ret = -ENOMEM;
+			goto e_pool;
 		}
 
 		cmd_q = &ccp->cmd_q[ccp->cmd_q_count];
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-31 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-30 18:28 [PATCH] crypto:ccp - Return from init on allocation failure Hook, Gary
2019-07-31 16:58 ` Gary R Hook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).