tpm_tis: Use devm_free_irq not free_irq
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 25 Nov 2015 21:05:30 +0000 (14:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Mar 2017 10:13:18 +0000 (12:13 +0200)
commit 727f28b8ca24a581c7bd868326b8cea1058c720a upstream.

The interrupt is always allocated with devm_request_irq so it
must always be freed with devm_free_irq.

Fixes: 448e9c55c12d ("tpm_tis: verify interrupt during init")
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Martin Wilck <Martin.Wilck@ts.fujitsu.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Acked-by: Peter Huewe <peterhuewe@gmx.de>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_tis.c

index 65f7eecc45b01c489e2381b2311a95f2898527df..f10a107614b47dab06df4ad2166fa3f321fda822 100644 (file)
@@ -401,7 +401,7 @@ static void disable_interrupts(struct tpm_chip *chip)
        iowrite32(intmask,
                  chip->vendor.iobase +
                  TPM_INT_ENABLE(chip->vendor.locality));
-       free_irq(chip->vendor.irq, chip);
+       devm_free_irq(chip->pdev, chip->vendor.irq, chip);
        chip->vendor.irq = 0;
 }