diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2019-05-27 16:50:58 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-06-06 14:38:56 +0800 |
commit | 082a9d0918d2aae48dc3b836a8e3ca6aa53d2495 (patch) | |
tree | 857bf8fa313dc94929f16caa62721db98ca5b466 /drivers/crypto | |
parent | 942d849d32d0126442bdf7a4052bb46fbf23a3c6 (diff) | |
download | linux-082a9d0918d2aae48dc3b836a8e3ca6aa53d2495.tar.gz linux-082a9d0918d2aae48dc3b836a8e3ca6aa53d2495.tar.bz2 linux-082a9d0918d2aae48dc3b836a8e3ca6aa53d2495.zip |
crypto: inside-secure - change returned error when a descriptor reports an error
This patch changes the error reported by the Inside Secure SafeXcel
driver when a result descriptor reports an error, from -EIO to -EINVAL,
as this is what the crypto framework expects. This was found while
running the crypto extra tests.
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/inside-secure/safexcel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index d5392893973c..316e5e4c1c74 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -591,7 +591,7 @@ inline int safexcel_rdesc_check_errors(struct safexcel_crypto_priv *priv, dev_err(priv->dev, "cipher: result: result descriptor error (0x%x)\n", rdesc->result_data.error_code); - return -EIO; + return -EINVAL; } else if (rdesc->result_data.error_code == BIT(9)) { /* Authentication failed */ return -EBADMSG; |