Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d72d6c4 authored by Himanshu Jha's avatar Himanshu Jha Committed by Doug Ledford
Browse files

RDMA/bnxt_re: remove unnecessary call to memset



call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d518a44d
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -911,7 +911,6 @@ static struct bnxt_re_ah *bnxt_re_create_shadow_qp_ah
	if (!ah)
	if (!ah)
		return NULL;
		return NULL;


	memset(ah, 0, sizeof(*ah));
	ah->rdev = rdev;
	ah->rdev = rdev;
	ah->qplib_ah.pd = &pd->qplib_pd;
	ah->qplib_ah.pd = &pd->qplib_pd;


@@ -958,7 +957,6 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp
	if (!qp)
	if (!qp)
		return NULL;
		return NULL;


	memset(qp, 0, sizeof(*qp));
	qp->rdev = rdev;
	qp->rdev = rdev;


	/* Initialize the shadow QP structure from the QP1 values */
	/* Initialize the shadow QP structure from the QP1 values */