Commit a8d63a53 authored by Zhu Yanjun's avatar Zhu Yanjun Committed by David S. Miller

rds: remove unnecessary returned value check

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: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 37411cad
...@@ -438,16 +438,12 @@ int rds_ib_init(void) ...@@ -438,16 +438,12 @@ int rds_ib_init(void)
if (ret) if (ret)
goto out_sysctl; goto out_sysctl;
ret = rds_trans_register(&rds_ib_transport); rds_trans_register(&rds_ib_transport);
if (ret)
goto out_recv;
rds_info_register_func(RDS_INFO_IB_CONNECTIONS, rds_ib_ic_info); rds_info_register_func(RDS_INFO_IB_CONNECTIONS, rds_ib_ic_info);
goto out; goto out;
out_recv:
rds_ib_recv_exit();
out_sysctl: out_sysctl:
rds_ib_sysctl_exit(); rds_ib_sysctl_exit();
out_ibreg: out_ibreg:
......
...@@ -910,7 +910,7 @@ void rds_connect_path_complete(struct rds_conn_path *conn, int curr); ...@@ -910,7 +910,7 @@ void rds_connect_path_complete(struct rds_conn_path *conn, int curr);
void rds_connect_complete(struct rds_connection *conn); void rds_connect_complete(struct rds_connection *conn);
/* transport.c */ /* 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); void rds_trans_unregister(struct rds_transport *trans);
struct rds_transport *rds_trans_get_preferred(struct net *net, __be32 addr); struct rds_transport *rds_trans_get_preferred(struct net *net, __be32 addr);
void rds_trans_put(struct rds_transport *trans); void rds_trans_put(struct rds_transport *trans);
......
...@@ -652,16 +652,12 @@ static int rds_tcp_init(void) ...@@ -652,16 +652,12 @@ static int rds_tcp_init(void)
if (ret) if (ret)
goto out_pernet; goto out_pernet;
ret = rds_trans_register(&rds_tcp_transport); rds_trans_register(&rds_tcp_transport);
if (ret)
goto out_recv;
rds_info_register_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info); rds_info_register_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
goto out; goto out;
out_recv:
rds_tcp_recv_exit();
out_pernet: out_pernet:
unregister_pernet_subsys(&rds_tcp_net_ops); unregister_pernet_subsys(&rds_tcp_net_ops);
out_notifier: out_notifier:
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
static struct rds_transport *transports[RDS_TRANS_COUNT]; static struct rds_transport *transports[RDS_TRANS_COUNT];
static DECLARE_RWSEM(rds_trans_sem); 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); BUG_ON(strlen(trans->t_name) + 1 > TRANSNAMSIZ);
...@@ -55,8 +55,6 @@ int rds_trans_register(struct rds_transport *trans) ...@@ -55,8 +55,6 @@ int rds_trans_register(struct rds_transport *trans)
} }
up_write(&rds_trans_sem); up_write(&rds_trans_sem);
return 0;
} }
EXPORT_SYMBOL_GPL(rds_trans_register); EXPORT_SYMBOL_GPL(rds_trans_register);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment