Skip to content

Commit f5e383a

Browse files
evdenisjoergroedel
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 9ebcfad commit f5e383a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/iommu/fsl_pamu.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,10 +1174,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
11741174
if (irq != NO_IRQ)
11751175
free_irq(irq, data);
11761176

1177-
if (data) {
1178-
memset(data, 0, sizeof(struct pamu_isr_data));
1179-
kfree(data);
1180-
}
1177+
kzfree(data);
11811178

11821179
if (pamu_regs)
11831180
iounmap(pamu_regs);

0 commit comments

Comments
 (0)