diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2021-12-15 06:06:25 +0000 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-01-05 13:47:43 -0400 |
commit | 47920e4d2cbfe64e85c8b536a792a91a94c7c187 (patch) | |
tree | e5ac361420e90d92efa2002a2e45cee9fe5e32ea /drivers/infiniband/sw | |
parent | 37c995ed19fdd4695d18fad24c7eaa441ea86564 (diff) | |
download | linux-47920e4d2cbfe64e85c8b536a792a91a94c7c187.tar.bz2 |
RDMA/rxe: Remove redundant err variable
Return value directly instead of taking this in another redundant
variable.
Link: https://lore.kernel.org/20211215075258.442930-1-chi.minghao@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Reviewed-by: Devesh Sharma <Devesh.s.sharma@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_net.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index 2cb810cb890a..f557150bd59a 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -22,24 +22,20 @@ static struct rxe_recv_sockets recv_sockets; int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid) { - int err; unsigned char ll_addr[ETH_ALEN]; ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr); - err = dev_mc_add(rxe->ndev, ll_addr); - return err; + return dev_mc_add(rxe->ndev, ll_addr); } int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid) { - int err; unsigned char ll_addr[ETH_ALEN]; ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr); - err = dev_mc_del(rxe->ndev, ll_addr); - return err; + return dev_mc_del(rxe->ndev, ll_addr); } static struct dst_entry *rxe_find_route4(struct net_device *ndev, |