crypto: qat - Clean up error handling in qat_dh_set_secret()

Update the error handling in qat_dh_set_secret() to mirror
dh_set_secret().  The new version is less error-prone because freeing
memory and setting the pointers to NULL is now only done in one place.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Eric Biggers 2017-11-05 18:30:47 -08:00 • committed by Herbert Xu
commit 5829cc8da9