From: zhong jiang <zhongjiang@huawei.com>
To: <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org, zhongjiang@huawei.com,
linux-kernel@vger.kernel.org
Subject: [PATCH v2] iommu/pamu: Use kzfree rather than its implementation
Date: Wed, 4 Sep 2019 17:43:44 +0800 [thread overview]
Message-ID: <1567590224-23364-1-git-send-email-zhongjiang@huawei.com> (raw)
Use kzfree instead of memset() + kfree().
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/iommu/fsl_pamu.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index cde281b..e924368 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -1174,11 +1174,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
if (irq != NO_IRQ)
free_irq(irq, data);
- if (data) {
- memset(data, 0, sizeof(struct pamu_isr_data));
- kfree(data);
- }
-
+ kzfree(data);
if (pamu_regs)
iounmap(pamu_regs);
--
1.7.12.4
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
reply other threads:[~2019-09-04 9:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1567590224-23364-1-git-send-email-zhongjiang@huawei.com \
--to=zhongjiang@huawei.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.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;
as well as URLs for NNTP newsgroup(s).