From: Akinobu Mita Date: Fri, 22 Dec 2006 09:10:09 +0000 (-0800) Subject: [PATCH] gss_spkm3: fix error handling in module init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fadfc8e930dcaf502b49a0a0170ba8ebe9a34c49;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] gss_spkm3: fix error handling in module init Return error and prevent from loading module when gss_mech_register() failed. Cc: Andy Adamson Cc: J. Bruce Fields Acked-by: Trond Myklebust Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/net/sunrpc/auth_gss/gss_spkm3_mech.c b/net/sunrpc/auth_gss/gss_spkm3_mech.c index 41465072d0b5..8ef3f1c19435 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_mech.c +++ b/net/sunrpc/auth_gss/gss_spkm3_mech.c @@ -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)