Commit 44c891af authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman

staging: ccree: fix unmatched if/else braces

Fix mismatched braces between if and else.
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a8f6cbaa
...@@ -551,8 +551,9 @@ int ssi_buffer_mgr_map_blkcipher_request( ...@@ -551,8 +551,9 @@ int ssi_buffer_mgr_map_blkcipher_request(
SSI_LOG_DEBUG("Mapped iv %u B at va=%pK to dma=0x%llX\n", SSI_LOG_DEBUG("Mapped iv %u B at va=%pK to dma=0x%llX\n",
ivsize, info, ivsize, info,
(unsigned long long)req_ctx->gen_ctx.iv_dma_addr); (unsigned long long)req_ctx->gen_ctx.iv_dma_addr);
} else } else {
req_ctx->gen_ctx.iv_dma_addr = 0; req_ctx->gen_ctx.iv_dma_addr = 0;
}
/* Map the src SGL */ /* Map the src SGL */
rc = ssi_buffer_mgr_map_scatterlist(dev, src, rc = ssi_buffer_mgr_map_scatterlist(dev, src,
......
...@@ -401,8 +401,9 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm, ...@@ -401,8 +401,9 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm,
/* STAT_PHASE_1: Copy key to ctx */ /* STAT_PHASE_1: Copy key to ctx */
dma_sync_single_for_cpu(dev, ctx_p->user.key_dma_addr, dma_sync_single_for_cpu(dev, ctx_p->user.key_dma_addr,
max_key_buf_size, DMA_TO_DEVICE); max_key_buf_size, DMA_TO_DEVICE);
#if SSI_CC_HAS_MULTI2
if (ctx_p->flow_mode == S_DIN_to_MULTI2) { if (ctx_p->flow_mode == S_DIN_to_MULTI2) {
#if SSI_CC_HAS_MULTI2
memcpy(ctx_p->user.key, key, CC_MULTI2_SYSTEM_N_DATA_KEY_SIZE); memcpy(ctx_p->user.key, key, CC_MULTI2_SYSTEM_N_DATA_KEY_SIZE);
ctx_p->key_round_number = key[CC_MULTI2_SYSTEM_N_DATA_KEY_SIZE]; ctx_p->key_round_number = key[CC_MULTI2_SYSTEM_N_DATA_KEY_SIZE];
if (ctx_p->key_round_number < CC_MULTI2_MIN_NUM_ROUNDS || if (ctx_p->key_round_number < CC_MULTI2_MIN_NUM_ROUNDS ||
...@@ -410,10 +411,8 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm, ...@@ -410,10 +411,8 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm,
crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
SSI_LOG_DEBUG("ssi_blkcipher_setkey: SSI_CC_HAS_MULTI2 einval"); SSI_LOG_DEBUG("ssi_blkcipher_setkey: SSI_CC_HAS_MULTI2 einval");
return -EINVAL; return -EINVAL;
}
} else
#endif /*SSI_CC_HAS_MULTI2*/ #endif /*SSI_CC_HAS_MULTI2*/
{ } else {
memcpy(ctx_p->user.key, key, keylen); memcpy(ctx_p->user.key, key, keylen);
if (keylen == 24) if (keylen == 24)
memset(ctx_p->user.key + 24, 0, CC_AES_KEY_SIZE_MAX - 24); memset(ctx_p->user.key + 24, 0, CC_AES_KEY_SIZE_MAX - 24);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment