[PATCH] gss_spkm3: fix error handling in module init
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 22 Dec 2006 09:10:09 +0000 (01:10 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 22 Dec 2006 16:55:49 +0000 (08:55 -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 41465072d0b59168cbdcb9a3aed3294a58ab7458..8ef3f1c1943564f5eb788467f40dff1ff8852604 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)