mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kai Ye <yekai13@huawei.com>
To: <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<yekai13@huawei.com>
Subject: [PATCH v3 1/4] crypto: hisilicon/qm - delete redundant null assignment operations
Date: Sat, 12 Nov 2022 02:12:50 +0000	[thread overview]
Message-ID: <20221112021253.34862-2-yekai13@huawei.com> (raw)
In-Reply-To: <20221112021253.34862-1-yekai13@huawei.com>

There is no security data in the pointer. It is only a value transferred
as a structure. It makes no sense to zero a variable that is on the stack.
So not need to set the pointer to null.

Signed-off-by: Kai Ye <yekai13@huawei.com>
---
 drivers/crypto/hisilicon/qm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 363a02810a16..849dc80a7118 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -1773,7 +1773,6 @@ static void dfx_regs_uninit(struct hisi_qm *qm,
 		dregs[i].regs = NULL;
 	}
 	kfree(dregs);
-	dregs = NULL;
 }
 
 /**
-- 
2.17.1


  reply	other threads:[~2022-11-12  2:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12  2:12 [PATCH v3 0/4] crypto: hisilicon/qm - reconstruct and optimize the debugfs code Kai Ye
2022-11-12  2:12 ` Kai Ye [this message]
2022-11-12  2:12 ` [PATCH v3 2/4] crypto: hisilicon/qm - modify the process of regs dfx Kai Ye
2022-11-12  2:12 ` [PATCH v3 3/4] crypto: hisilicon/qm - split a debugfs.c from qm Kai Ye
2022-11-12  2:12 ` [PATCH v3 4/4] crypto: hisilicon/qm - the command dump process is modified Kai Ye
2022-11-18  9:17 ` [PATCH v3 0/4] crypto: hisilicon/qm - reconstruct and optimize the debugfs code Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221112021253.34862-2-yekai13@huawei.com \
    --to=yekai13@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®