diff options
author | Denis Efremov <efremov@linux.com> | 2020-06-04 14:37:09 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2020-06-30 10:47:38 +0200 |
commit | f5e383ac8b58f421ac0a005f6df4f2e9eefeb93f (patch) | |
tree | fd976dc49136895ba118ceab910497bc57fedcc1 /drivers/iommu | |
parent | Linux 5.8-rc3 (diff) | |
download | linux-f5e383ac8b58f421ac0a005f6df4f2e9eefeb93f.tar.xz linux-f5e383ac8b58f421ac0a005f6df4f2e9eefeb93f.zip |
iommu/pamu: Use kzfree() in fsl_pamu_probe()
Use kzfree() instead of opencoded memset with 0 followed by kfree().
Null check is not required since kzfree() checks for NULL internally.
Signed-off-by: Denis Efremov <efremov@linux.com>
Link: https://lore.kernel.org/r/20200604123709.96561-1-efremov@linux.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/fsl_pamu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index cde281b97afa..099a11a35fb9 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -1174,10 +1174,7 @@ error: 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); |