From: Antoine Tenart Date: Mon, 27 May 2019 14:50:58 +0000 (+0200) Subject: crypto: inside-secure - change returned error when a descriptor reports an error X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=082a9d0918d2aae48dc3b836a8e3ca6aa53d2495;p=linux.git 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 Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index d5392893973c0..316e5e4c1c741 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;