[PATCH] gss_spkm3: fix error handling in module init

From: Akinobu Mita
Date: Sat Oct 28 2006 - 14:54:40 EST


return error and privent from loading module when gss_mech_register()
failed.

Cc: Andy Adamson <andros@xxxxxxxxxxxxxx>
Cc: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
Cc: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>

net/sunrpc/auth_gss/gss_spkm3_mech.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: work-fault-inject/net/sunrpc/auth_gss/gss_spkm3_mech.c
===================================================================
--- work-fault-inject.orig/net/sunrpc/auth_gss/gss_spkm3_mech.c
+++ work-fault-inject/net/sunrpc/auth_gss/gss_spkm3_mech.c
@@ -288,7 +288,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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/