diff options
-rw-r--r-- | net/sunrpc/xprt.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 99a52aabe332..29e401bb612e 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -108,13 +108,10 @@ int xprt_register_transport(struct xprt_class *transport) | |||
108 | goto out; | 108 | goto out; |
109 | } | 109 | } |
110 | 110 | ||
111 | result = -EINVAL; | 111 | list_add_tail(&transport->list, &xprt_list); |
112 | if (try_module_get(THIS_MODULE)) { | 112 | printk(KERN_INFO "RPC: Registered %s transport module.\n", |
113 | list_add_tail(&transport->list, &xprt_list); | 113 | transport->name); |
114 | printk(KERN_INFO "RPC: Registered %s transport module.\n", | 114 | result = 0; |
115 | transport->name); | ||
116 | result = 0; | ||
117 | } | ||
118 | 115 | ||
119 | out: | 116 | out: |
120 | spin_unlock(&xprt_list_lock); | 117 | spin_unlock(&xprt_list_lock); |
@@ -143,7 +140,6 @@ int xprt_unregister_transport(struct xprt_class *transport) | |||
143 | "RPC: Unregistered %s transport module.\n", | 140 | "RPC: Unregistered %s transport module.\n", |
144 | transport->name); | 141 | transport->name); |
145 | list_del_init(&transport->list); | 142 | list_del_init(&transport->list); |
146 | module_put(THIS_MODULE); | ||
147 | goto out; | 143 | goto out; |
148 | } | 144 | } |
149 | } | 145 | } |