IB/providers: Avoid null netdev check for RoCE
Now that IB core GID cache ensures that all RoCE entries have an associated netdev remove null checks from the provider drivers for clarity. Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
14169e333e
commit
3e44e0ee08
@@ -2527,7 +2527,7 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp,
|
||||
|
||||
status = ib_get_cached_gid(&dev->ibdev, 1, grh->sgid_index,
|
||||
&sgid, &sgid_attr);
|
||||
if (!status && sgid_attr.ndev) {
|
||||
if (!status) {
|
||||
vlan_id = rdma_vlan_dev_vlan_id(sgid_attr.ndev);
|
||||
memcpy(mac_addr, sgid_attr.ndev->dev_addr, ETH_ALEN);
|
||||
dev_put(sgid_attr.ndev);
|
||||
|
Reference in New Issue
Block a user