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: 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>

authored by Zhu Yanjun and committed by David S. Miller a8d63a53 37411cad

+4 -14
+1 -5
net/rds/ib.c
··· 438 438 if (ret) 439 439 goto out_sysctl; 440 440 441 - ret = rds_trans_register(&rds_ib_transport); 442 - if (ret) 443 - goto out_recv; 441 + rds_trans_register(&rds_ib_transport); 444 442 445 443 rds_info_register_func(RDS_INFO_IB_CONNECTIONS, rds_ib_ic_info); 446 444 447 445 goto out; 448 446 449 - out_recv: 450 - rds_ib_recv_exit(); 451 447 out_sysctl: 452 448 rds_ib_sysctl_exit(); 453 449 out_ibreg:
+1 -1
net/rds/rds.h
··· 910 910 void rds_connect_complete(struct rds_connection *conn); 911 911 912 912 /* transport.c */ 913 - int rds_trans_register(struct rds_transport *trans); 913 + void rds_trans_register(struct rds_transport *trans); 914 914 void rds_trans_unregister(struct rds_transport *trans); 915 915 struct rds_transport *rds_trans_get_preferred(struct net *net, __be32 addr); 916 916 void rds_trans_put(struct rds_transport *trans);
+1 -5
net/rds/tcp.c
··· 652 652 if (ret) 653 653 goto out_pernet; 654 654 655 - ret = rds_trans_register(&rds_tcp_transport); 656 - if (ret) 657 - goto out_recv; 655 + rds_trans_register(&rds_tcp_transport); 658 656 659 657 rds_info_register_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info); 660 658 661 659 goto out; 662 660 663 - out_recv: 664 - rds_tcp_recv_exit(); 665 661 out_pernet: 666 662 unregister_pernet_subsys(&rds_tcp_net_ops); 667 663 out_notifier:
+1 -3
net/rds/transport.c
··· 40 40 static struct rds_transport *transports[RDS_TRANS_COUNT]; 41 41 static DECLARE_RWSEM(rds_trans_sem); 42 42 43 - int rds_trans_register(struct rds_transport *trans) 43 + void rds_trans_register(struct rds_transport *trans) 44 44 { 45 45 BUG_ON(strlen(trans->t_name) + 1 > TRANSNAMSIZ); 46 46 ··· 55 55 } 56 56 57 57 up_write(&rds_trans_sem); 58 - 59 - return 0; 60 58 } 61 59 EXPORT_SYMBOL_GPL(rds_trans_register); 62 60