diff options
author | Tero Kristo <t-kristo@ti.com> | 2019-11-05 16:01:09 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-12-11 16:37:00 +0800 |
commit | 96846223ac73c66f55bfcb46a464450136bdbbc2 (patch) | |
tree | 9e1c8479b8ebc3ebcdf467802b698b6a48eb9bf4 /drivers/crypto/omap-des.c | |
parent | 04a4616e6a21eb5ed2c8399160be370af4f67037 (diff) | |
download | lwn-96846223ac73c66f55bfcb46a464450136bdbbc2.tar.gz lwn-96846223ac73c66f55bfcb46a464450136bdbbc2.zip |
crypto: omap-des - avoid unnecessary spam with bad cryptlen
Remove the error print in this case, and just return the error.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-des.c')
-rw-r--r-- | drivers/crypto/omap-des.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 2e3ecb860e27..31fc9300b990 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -637,10 +637,8 @@ static int omap_des_crypt(struct skcipher_request *req, unsigned long mode) !!(mode & FLAGS_ENCRYPT), !!(mode & FLAGS_CBC)); - if (!IS_ALIGNED(req->cryptlen, DES_BLOCK_SIZE)) { - pr_err("request size is not exact amount of DES blocks\n"); + if (!IS_ALIGNED(req->cryptlen, DES_BLOCK_SIZE)) return -EINVAL; - } dd = omap_des_find_dev(ctx); if (!dd) |