s390/crypto: simplify init / exit functions
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 18 Aug 2016 10:34:34 +0000 (12:34 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Aug 2016 09:05:08 +0000 (11:05 +0200)
commitd863d5945f2be0abfcd9d36b1a7c605f3eaef517
tree48803fe3c76f89ff76395d3b6bbcd2b61821f362
parent0177db01adf26cf9c5dfe1feaf17087de4b9e40e
s390/crypto: simplify init / exit functions

The aes and the des module register multiple crypto algorithms
dependent on the availability of specific CPACF instructions.
To simplify the deregistration with crypto_unregister_alg add
an array with pointers to the successfully registered algorithms
and use it for the error handling in the init function and in
the module exit function.

Reviewed-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/crypto/aes_s390.c
arch/s390/crypto/des_s390.c