summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/axis/artpec6_crypto.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2020-02-12 14:08:59 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2020-02-12 14:08:59 +0100
commit74c12ee02af109adcde36ec184fa59c0afb0edaa (patch)
treedfe4615e0a5e3f8583e685aacdd9a0908e9ffbe3 /drivers/crypto/axis/artpec6_crypto.c
parentdrm/bridge: ti-tfp410: Update drm_connector_init_with_ddc() error message (diff)
parentLinux 5.6-rc1 (diff)
downloadlinux-74c12ee02af109adcde36ec184fa59c0afb0edaa.tar.xz
linux-74c12ee02af109adcde36ec184fa59c0afb0edaa.zip
Merge v5.6-rc1 into drm-misc-fixes
We're based on v5.6, need v5.6-rc1 at least. :) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/crypto/axis/artpec6_crypto.c')
-rw-r--r--drivers/crypto/axis/artpec6_crypto.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c
index 4b20606983a4..fcf1effc7661 100644
--- a/drivers/crypto/axis/artpec6_crypto.c
+++ b/drivers/crypto/axis/artpec6_crypto.c
@@ -1249,10 +1249,8 @@ static int artpec6_crypto_aead_set_key(struct crypto_aead *tfm, const u8 *key,
{
struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(&tfm->base);
- if (len != 16 && len != 24 && len != 32) {
- crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
- return -1;
- }
+ if (len != 16 && len != 24 && len != 32)
+ return -EINVAL;
ctx->key_length = len;
@@ -1606,8 +1604,6 @@ artpec6_crypto_cipher_set_key(struct crypto_skcipher *cipher, const u8 *key,
case 32:
break;
default:
- crypto_skcipher_set_flags(cipher,
- CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
}
@@ -1634,8 +1630,6 @@ artpec6_crypto_xts_set_key(struct crypto_skcipher *cipher, const u8 *key,
case 64:
break;
default:
- crypto_skcipher_set_flags(cipher,
- CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
}