crypto: vmx - return correct error code on failed setkey
authorEric Biggers <ebiggers@google.com>
Wed, 10 Apr 2019 06:46:35 +0000 (23:46 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Apr 2019 14:14:58 +0000 (22:14 +0800)
commit694e0db6600c12f8172efb51cd4b4bbade958562
tree02072801a75103ecb788005f608b4333b7185241
parent4a8108b70508df0b6c4ffa4a3974dab93dcbe851
crypto: vmx - return correct error code on failed setkey

In the VMX implementations of AES and AES modes, return -EINVAL when an
invalid key length is provided, rather than some unusual error code
determined via a series of additions.  This makes the behavior match the
other AES implementations in the kernel's crypto API.

Cc: Daniel Axtens <dja@axtens.net>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/vmx/aes.c
drivers/crypto/vmx/aes_cbc.c
drivers/crypto/vmx/aes_ctr.c
drivers/crypto/vmx/aes_xts.c