Commit 269c97fd authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Jason Gunthorpe

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: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 890ac8d9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment