aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/axis/artpec6_crypto.c
diff options
context:
space:
mode:
authorGiovanni Cabiddu2019-04-29 16:43:19 +0100
committerHerbert Xu2019-05-23 14:01:03 +0800
commit92fec16d1f4d852711511844b02f5353825d1578 (patch)
tree4eb64c2496dbda483b1ee2c5ac29937028eb6bf5 /drivers/crypto/axis/artpec6_crypto.c
parent51d33c2f05edeace67e6f7f0603dc7aa4667e9a6 (diff)
crypto: qat - return proper error code in setkey
If an invalid key is provided as input to the setkey function, the function always failed returning -ENOMEM rather than -EINVAL. Furthermore, if setkey was called multiple times with an invalid key, the device instance was getting leaked. This patch fixes the error paths in the setkey functions by returning the correct error code in case of error and freeing all the resources allocated in this function in case of failure. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin <conor.mcloughlin@intel.com> Tested-by: Sergey Portnoy <sergey.portnoy@intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/axis/artpec6_crypto.c')
0 files changed, 0 insertions, 0 deletions