From: Pavel Machek Date: Mon, 21 Sep 2020 11:34:35 +0000 (+0200) Subject: crypto: ccp - fix error handling X-Git-Tag: v5.10-rc1~181^2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e356c49c6cf0db3f00e1558749170bd56e47652d;p=thirdparty%2Fkernel%2Flinux.git crypto: ccp - fix error handling Fix resource leak in error handling. Signed-off-by: Pavel Machek (CIP) Acked-by: John Allen Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index 4e9059c5fbb5d..d6a8f4e4b14a8 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1745,7 +1745,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 */