crypto: ccp - fix error handling
authorPavel Machek <pavel@denx.de>
Mon, 21 Sep 2020 11:34:35 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:05:41 +0000 (09:05 +0100)
[ Upstream commit e356c49c6cf0db3f00e1558749170bd56e47652d ]

Fix resource leak in error handling.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Acked-by: John Allen <john.allen@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ccp/ccp-ops.c

index c3f13d6..0aa18c1 100644 (file)
@@ -1195,7 +1195,7 @@ static int 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 */