mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
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>
This commit is contained in:
committed by
Jason Gunthorpe
parent
37c995ed19
commit
47920e4d2c
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user