Eric, We're almost there... :) On Fri, Oct 24, 2014 at 06:55:33AM -0500, Eric Rost wrote: > Adds CryptoAPI support to the Skein Hashing Algorithm driver. > > Signed-off-by: Eric Rost <eric.rost@xxxxxxxxxxxxx> > --- > drivers/staging/skein/Makefile | 3 +- > drivers/staging/skein/skein_generic.c | 191 ++++++++++++++++++++++++++++++++++ > 2 files changed, 193 insertions(+), 1 deletion(-) > create mode 100644 drivers/staging/skein/skein_generic.c > > diff --git a/drivers/staging/skein/Makefile b/drivers/staging/skein/Makefile > index ca746a9..d8177cc 100644 > --- a/drivers/staging/skein/Makefile > +++ b/drivers/staging/skein/Makefile > @@ -5,4 +5,5 @@ obj-$(CONFIG_CRYPTO_SKEIN) += skein_base.o \ > skein_api.o \ > skein_block.o \ > threefish_block.o \ > - threefish_api.o > + threefish_api.o \ > + skein_generic.o > diff --git a/drivers/staging/skein/skein_generic.c b/drivers/staging/skein/skein_generic.c > new file mode 100644 > index 0000000..39332e8 > --- /dev/null > +++ b/drivers/staging/skein/skein_generic.c ... > +static int __init skein_generic_init(void) > +{ > + if (crypto_register_shash(&alg256) || crypto_register_shash(&alg512) > + || crypto_register_shash(&alg1024)) { > + crypto_unregister_shash(&alg256); > + crypto_unregister_shash(&alg512); > + crypto_unregister_shash(&alg1024); > + return -1; > + } > + return 0; > +} This really needs to be something like: if (crypto_register_shash(&alg256)) goto bail; if (crypto_register_shash(&alg512)) goto unreg256; if (crypto_register_shash(&alg1024)) goto unreg512; return 0; unreg512: crypto_unregister_shash(&alg512); unreg256: crypto_unregister_shash(&alg256); bail: return -1; thx, Jason. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel