summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-04-01 15:08:23 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-04-03 21:33:51 -0600
commit3e44e0ee0893cbea257e585dbd4c7d2ff00f1a6b (patch)
treeb51806592482839bfedcb93c808477ea2d71afe9 /drivers/infiniband/sw
parent14169e333e712e3640a6e4b1a81239ce952e3fcf (diff)
downloadblackbird-op-linux-3e44e0ee0893cbea257e585dbd4c7d2ff00f1a6b.tar.gz
blackbird-op-linux-3e44e0ee0893cbea257e585dbd4c7d2ff00f1a6b.zip
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>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_verbs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index f83bbf550ec0..0661c2783b14 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -256,9 +256,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
rxe_av_fill_ip_info(av, attr, &sgid_attr, &sgid);
-
- if (sgid_attr.ndev)
- dev_put(sgid_attr.ndev);
+ dev_put(sgid_attr.ndev);
return 0;
}
OpenPOWER on IntegriCloud