]> Git Repo - linux.git/commitdiff
iommu/pamu: Use kzfree() in fsl_pamu_probe()
authorDenis Efremov <[email protected]>
Thu, 4 Jun 2020 12:37:09 +0000 (15:37 +0300)
committerJoerg Roedel <[email protected]>
Tue, 30 Jun 2020 08:47:38 +0000 (10:47 +0200)
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]>
drivers/iommu/fsl_pamu.c

index cde281b97afa82efea6da859ba8ccf95502cd08c..099a11a35fb9c06d52135e89d87cc4b7125bf75a 100644 (file)
@@ -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);
This page took 0.057756 seconds and 4 git commands to generate.