Skip to content

Commit

Permalink
crypto: inside-secure - change returned error when a descriptor repor…
Browse files Browse the repository at this point in the history
…ts 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>
  • Loading branch information
Antoine Tenart authored and Herbert Xu committed Jun 6, 2019
1 parent 942d849 commit 082a9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/inside-secure/safexcel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 082a9d0

Please sign in to comment.