diff options
author | Tero Kristo <t-kristo@ti.com> | 2019-11-05 15:01:10 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-12-11 09:37:00 +0100 |
commit | aca8bf0027d3ab4492d47e6b05b13911948903db (patch) | |
tree | 87ca211e08d7ce343211500a2e8277f0b2a121ef /drivers/crypto/omap-des.c | |
parent | crypto: omap-des - avoid unnecessary spam with bad cryptlen (diff) | |
download | linux-aca8bf0027d3ab4492d47e6b05b13911948903db.tar.xz linux-aca8bf0027d3ab4492d47e6b05b13911948903db.zip |
crypto: omap-des - handle NULL cipher request
If no data is provided for DES request, just return immediately. No
processing is needed in this case.
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 31fc9300b990..8eda43319204 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -637,6 +637,9 @@ static int omap_des_crypt(struct skcipher_request *req, unsigned long mode) !!(mode & FLAGS_ENCRYPT), !!(mode & FLAGS_CBC)); + if (!req->cryptlen) + return 0; + if (!IS_ALIGNED(req->cryptlen, DES_BLOCK_SIZE)) return -EINVAL; |