diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-05-20 09:54:23 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-05-21 15:50:53 -0300 |
commit | 269c97fd485439702048676326286588c33fd3ba (patch) | |
tree | ec418236e5b5acc298a5f8acf6a87c1783381040 /drivers/infiniband/hw | |
parent | 890ac8d97e6722a9e4a66a0bd836d1b028d075fe (diff) |
RDMA/nes: Remove useless NULL checks
The destroy functions are always called with relevant structs, there is no
need to check their existence.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index ad2b8322cc3f..fb2d0762c7c8 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -1646,9 +1646,6 @@ static int nes_destroy_cq(struct ib_cq *ib_cq, struct ib_udata *udata) u32 opcode = 0; int ret; - if (ib_cq == NULL) - return 0; - nescq = to_nescq(ib_cq); nesvnic = to_nesvnic(ib_cq->device); nesdev = nesvnic->nesdev; @@ -3708,9 +3705,6 @@ void nes_port_ibevent(struct nes_vnic *nesvnic) */ void nes_destroy_ofa_device(struct nes_ib_device *nesibdev) { - if (nesibdev == NULL) - return; - nes_unregister_ofa_device(nesibdev); ib_dealloc_device(&nesibdev->ibdev); |