[CRYPTO] tcrypt: Return -EAGAIN from module_init()
authorMichal Ludvig <michal@logix.cz>
Tue, 30 May 2006 04:49:38 +0000 (14:49 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 26 Jun 2006 07:34:41 +0000 (17:34 +1000)
Intentionaly return -EAGAIN from module_init() to ensure
it doesn't stay loaded in the kernel.  The module does all
its work from init() and doesn't offer any runtime
functionality => we don't need it in the memory, do we?

Signed-off-by: Michal Ludvig <michal@logix.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/tcrypt.c

index 49e344f..7bf93c5 100644 (file)
@@ -1113,7 +1113,14 @@ static int __init init(void)
 
        kfree(xbuf);
        kfree(tvmem);
-       return 0;
+
+       /* We intentionaly return -EAGAIN to prevent keeping
+        * the module. It does all its work from init()
+        * and doesn't offer any runtime functionality 
+        * => we don't need it in the memory, do we?
+        *                                        -- mludvig
+        */
+       return -EAGAIN;
 }
 
 /*