From: Tero Kristo Date: Tue, 5 Nov 2019 14:01:09 +0000 (+0200) Subject: crypto: omap-des - avoid unnecessary spam with bad cryptlen X-Git-Tag: v5.10.7~3034^2~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96846223ac73c66f55bfcb46a464450136bdbbc2;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 2e3ecb8..31fc930 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)