mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 10:56:06 -04:00
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>
This commit is contained in:
committed by
Joerg Roedel
parent
9ebcfadb06
commit
f5e383ac8b
@@ -1174,10 +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);
|
||||
|
||||
Reference in New Issue
Block a user