[PATCH] genetlink: don't touch module ref count
[linux-3.10.git] / net / netlink / genetlink.c
index 3b1378498d50b12647f2ea433a341b16502e1ac9..4ae1538c54a9397505d8ae3e74eb19eba6c50337 100644 (file)
@@ -222,11 +222,6 @@ int genl_register_family(struct genl_family *family)
                goto errout_locked;
        }
 
-       if (!try_module_get(family->owner)) {
-               err = -EBUSY;
-               goto errout_locked;
-       }
-
        if (family->id == GENL_ID_GENERATE) {
                u16 newid = genl_generate_id();
 
@@ -283,7 +278,6 @@ int genl_unregister_family(struct genl_family *family)
                INIT_LIST_HEAD(&family->ops_list);
                genl_unlock();
 
-               module_put(family->owner);
                kfree(family->attrbuf);
                genl_ctrl_event(CTRL_CMD_DELFAMILY, family);
                return 0;
@@ -535,7 +529,6 @@ static struct genl_family genl_ctrl = {
        .name = "nlctrl",
        .version = 0x1,
        .maxattr = CTRL_ATTR_MAX,
-       .owner = THIS_MODULE,
 };
 
 static int __init genl_init(void)