summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/crypto/dwc-spacc/spacc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/dwc-spacc/spacc_core.c b/drivers/crypto/dwc-spacc/spacc_core.c
index e3380528e82b..b7630f559973 100644
--- a/drivers/crypto/dwc-spacc/spacc_core.c
+++ b/drivers/crypto/dwc-spacc/spacc_core.c
@@ -1295,7 +1295,7 @@ int spacc_isenabled(struct spacc_device *spacc, int mode, int keysize)
{
int x;
- if (mode < 0 || mode > CRYPTO_MODE_LAST)
+ if (mode < 0 || mode >= CRYPTO_MODE_LAST)
return 0;
if (mode == CRYPTO_MODE_NULL ||