diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-07-13 11:19:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-16 08:41:01 +0200 |
commit | 079a7174ae7d24ae93e7fb26fcafdbe0218e08da (patch) | |
tree | 9ddcbf5109075411177c5cf101f742e30231b6ab /drivers/staging/ccree | |
parent | 698592e23e1bf3eae4c02b4169ac8c81310cfa0e (diff) |
staging: ccree: avoid constant comparison
Re-write predicate to avoid constant comparison.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree')
-rw-r--r-- | drivers/staging/ccree/ssi_aead.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index d9e342fa7e9f..46dd70872d57 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -1572,7 +1572,7 @@ static int config_ccm_adata(struct aead_request *req) /* taken from crypto/ccm.c */ /* 2 <= L <= 8, so 1 <= L' <= 7. */ - if (2 > l || l > 8) { + if (l < 2 || l > 8) { SSI_LOG_ERR("illegal iv value %X\n", req->iv[0]); return -EINVAL; } |