ipvs: Use genl_register_family_with_ops()
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Thu, 21 May 2009 10:34:05 +0000 (10:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 May 2009 23:50:24 +0000 (16:50 -0700)
Use genl_register_family_with_ops() instead of a copy.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/ipvs/ip_vs_ctl.c

index e01061f49cdc644b0fe99d48457795458f55aa91..7c1333c67ff3d5f810540eea5f774fc6582030dd 100644 (file)
@@ -3345,22 +3345,8 @@ static struct genl_ops ip_vs_genl_ops[] __read_mostly = {
 
 static int __init ip_vs_genl_register(void)
 {
-       int ret, i;
-
-       ret = genl_register_family(&ip_vs_genl_family);
-       if (ret)
-               return ret;
-
-       for (i = 0; i < ARRAY_SIZE(ip_vs_genl_ops); i++) {
-               ret = genl_register_ops(&ip_vs_genl_family, &ip_vs_genl_ops[i]);
-               if (ret)
-                       goto err_out;
-       }
-       return 0;
-
-err_out:
-       genl_unregister_family(&ip_vs_genl_family);
-       return ret;
+       return genl_register_family_with_ops(&ip_vs_genl_family,
+               ip_vs_genl_ops, ARRAY_SIZE(ip_vs_genl_ops));
 }
 
 static void ip_vs_genl_unregister(void)
This page took 0.027138 seconds and 5 git commands to generate.