]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
rds: remove unnecessary returned value check
authorZhu Yanjun <yanjun.zhu@oracle.com>
Fri, 3 Mar 2017 05:44:26 +0000 (00:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Mar 2017 17:51:22 +0000 (09:51 -0800)
The function rds_trans_register always returns 0. As such, it is not
necessary to check the returned value.

Cc: Joe Jin <joe.jin@oracle.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib.c
net/rds/rds.h
net/rds/tcp.c
net/rds/transport.c

index 0f557b2433112190d21c57ff8078dd4a8d719c0a..7a64c8db81abdca2048d24380e3441dd50f12b90 100644 (file)
@@ -438,16 +438,12 @@ int rds_ib_init(void)
        if (ret)
                goto out_sysctl;
 
-       ret = rds_trans_register(&rds_ib_transport);
-       if (ret)
-               goto out_recv;
+       rds_trans_register(&rds_ib_transport);
 
        rds_info_register_func(RDS_INFO_IB_CONNECTIONS, rds_ib_ic_info);
 
        goto out;
 
-out_recv:
-       rds_ib_recv_exit();
 out_sysctl:
        rds_ib_sysctl_exit();
 out_ibreg:
index 07fff73dd4f3f956c2cab393a9e834bb1215fc24..6f523ddfe1fb35c6bc721866ba80dc4303f61e25 100644 (file)
@@ -910,7 +910,7 @@ void rds_connect_path_complete(struct rds_conn_path *conn, int curr);
 void rds_connect_complete(struct rds_connection *conn);
 
 /* transport.c */
-int rds_trans_register(struct rds_transport *trans);
+void rds_trans_register(struct rds_transport *trans);
 void rds_trans_unregister(struct rds_transport *trans);
 struct rds_transport *rds_trans_get_preferred(struct net *net, __be32 addr);
 void rds_trans_put(struct rds_transport *trans);
index 5438f6725092b7962613f3cf0203e89f16735e34..a973d3b4dff0b2216bf3698cfbfeeb4b227dfc37 100644 (file)
@@ -652,16 +652,12 @@ static int rds_tcp_init(void)
        if (ret)
                goto out_pernet;
 
-       ret = rds_trans_register(&rds_tcp_transport);
-       if (ret)
-               goto out_recv;
+       rds_trans_register(&rds_tcp_transport);
 
        rds_info_register_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
 
        goto out;
 
-out_recv:
-       rds_tcp_recv_exit();
 out_pernet:
        unregister_pernet_subsys(&rds_tcp_net_ops);
 out_notifier:
index 2ffd3e30c6434e62333ac4eefdc1b8fea50dfbe1..0b188dd0a344cb0fd876fa2b32bb5e7475b255ff 100644 (file)
@@ -40,7 +40,7 @@
 static struct rds_transport *transports[RDS_TRANS_COUNT];
 static DECLARE_RWSEM(rds_trans_sem);
 
-int rds_trans_register(struct rds_transport *trans)
+void rds_trans_register(struct rds_transport *trans)
 {
        BUG_ON(strlen(trans->t_name) + 1 > TRANSNAMSIZ);
 
@@ -55,8 +55,6 @@ int rds_trans_register(struct rds_transport *trans)
        }
 
        up_write(&rds_trans_sem);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(rds_trans_register);