[PATCH] gss_spkm3: fix error handling in module init
Akinobu Mita [Fri, 22 Dec 2006 09:10:09 +0000 (01:10 -0800)]
Return error and prevent from loading module when gss_mech_register()
failed.

Cc: Andy Adamson <andros@citi.umich.edu>
Cc: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

net/sunrpc/auth_gss/gss_spkm3_mech.c

index 4146507..8ef3f1c 100644 (file)
@@ -228,7 +228,7 @@ static int __init init_spkm3_module(void)
        status = gss_mech_register(&gss_spkm3_mech);
        if (status)
                printk("Failed to register spkm3 gss mechanism!\n");
-       return 0;
+       return status;
 }
 
 static void __exit cleanup_spkm3_module(void)