Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: crypto: remove assertions on device handlers #6782

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions core/drivers/crypto/stm32/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ static TEE_Result cryp_update(union ip_ctx *ip_ctx, bool last_block,

static void cryp_copy_state(union ip_ctx *dst_ip_ctx, union ip_ctx *src_ip_ctx)
{
assert(IS_ENABLED(CFG_STM32_CRYP));

memcpy(&dst_ip_ctx->cryp, &src_ip_ctx->cryp, sizeof(dst_ip_ctx->cryp));
}

Expand Down Expand Up @@ -167,8 +165,6 @@ static void saes_final(union ip_ctx *ip_ctx)
{
struct crypto_cipher_ctx *ctx = ip_ctx->saes.fallback_ctx;

assert(IS_ENABLED(CFG_STM32_SAES));

if (ip_ctx->saes.use_fallback) {
assert(IS_ENABLED(CFG_STM32_SAES_SW_FALLBACK));
ctx->ops->final(ctx);
Expand All @@ -180,8 +176,6 @@ static void saes_copy_state(union ip_ctx *dst_ip_ctx, union ip_ctx *src_ip_ctx)
struct saes_ctx *src_ctx = &src_ip_ctx->saes;
struct crypto_cipher_ctx *fb_ctx = src_ctx->fallback_ctx;

assert(IS_ENABLED(CFG_STM32_SAES));

memcpy(&dst_ip_ctx->saes.ctx, &src_ctx->ctx, sizeof(src_ctx->ctx));

dst_ip_ctx->saes.algo = src_ctx->algo;
Expand Down