summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/inside-secure/safexcel_hash.c
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2018-05-14 15:11:01 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-05-26 18:11:40 +0200
commitbdfd19095685825ba7bbaa6740c9fc7fe4a2ca39 (patch)
tree5ca91d53a01114f6249d06ea0fbb60e4d2bbe1c3 /drivers/crypto/inside-secure/safexcel_hash.c
parentcrypto: inside-secure - fix the hash then encrypt/decrypt types (diff)
downloadlinux-bdfd19095685825ba7bbaa6740c9fc7fe4a2ca39.tar.xz
linux-bdfd19095685825ba7bbaa6740c9fc7fe4a2ca39.zip
crypto: inside-secure - improve error reporting
This patch improves the error reporting from the Inside Secure driver to the upper layers and crypto consumers. All errors reported by the engine aren't fatal, and some may be genuine. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure/safexcel_hash.c')
-rw-r--r--drivers/crypto/inside-secure/safexcel_hash.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
index 00d2cad0ff1c..6cbd879e8fb5 100644
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -146,11 +146,8 @@ static int safexcel_handle_req_result(struct safexcel_crypto_priv *priv, int rin
dev_err(priv->dev,
"hash: result: could not retrieve the result descriptor\n");
*ret = PTR_ERR(rdesc);
- } else if (rdesc->result_data.error_code) {
- dev_err(priv->dev,
- "hash: result: result descriptor error (%d)\n",
- rdesc->result_data.error_code);
- *ret = -EINVAL;
+ } else {
+ *ret = safexcel_rdesc_check_errors(priv, rdesc);
}
safexcel_complete(priv, ring);