public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: ccp - fix error handling
@ 2020-09-21 11:34 Pavel Machek
  2020-09-22 12:59 ` John Allen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pavel Machek @ 2020-09-21 11:34 UTC (permalink / raw)
  To: thomas.lendacky, john.allen, herbert, davem, linux-crypto,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

Fix resource leak in error handling.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index bd270e66185e..40869ea1ed20 100644
--- a/drivers/crypto/ccp/ccp-ops.c
+++ b/drivers/crypto/ccp/ccp-ops.c
@@ -1744,7 +1744,7 @@ ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
 			break;
 		default:
 			ret = -EINVAL;
-			goto e_ctx;
+			goto e_data;
 		}
 	} else {
 		/* Stash the context */

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2020-10-02 11:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21 11:34 [PATCH] crypto: ccp - fix error handling Pavel Machek
2020-09-22 12:59 ` John Allen
2020-09-22 13:41 ` Tom Lendacky
2020-10-02 11:54 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox