diff mbox

[rdma-core,4/5] hns: Remove useless assignments

Message ID 20171214223544.30117-5-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Dec. 14, 2017, 10:35 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

We free the memory a few lines later, the first assign cannot do anything
useful.

No sense in zeroing a stack variable before exiting.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 providers/hns/hns_roce_u.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox

Patch

diff --git a/providers/hns/hns_roce_u.c b/providers/hns/hns_roce_u.c
index 9b5de441a3fdf1..489b71614614fe 100644
--- a/providers/hns/hns_roce_u.c
+++ b/providers/hns/hns_roce_u.c
@@ -167,10 +167,7 @@  static void hns_roce_free_context(struct ibv_context *ibctx)
 	if (to_hr_dev(ibctx->device)->hw_version == HNS_ROCE_HW_VER1)
 		munmap(context->cq_tptr_base, HNS_ROCE_CQ_DB_BUF_SIZE);
 
-	context->uar = NULL;
-
 	free(context);
-	context = NULL;
 }
 
 static void hns_uninit_device(struct verbs_device *verbs_device)