[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MINIOS PATCH v3 04/12] use alloc_file_type() and get_file_from_fd() in tpm_tis
On 18.01.22 15:32, Andrew Cooper wrote: On 16/01/2022 08:33, Juergen Gross wrote:diff --git a/tpm_tis.c b/tpm_tis.c index 477f5550..b88ec874 100644 --- a/tpm_tis.c +++ b/tpm_tis.c @@ -1093,6 +1097,26 @@ ssize_t tpm_getcap(struct tpm_chip *chip, uint32_t subcap_id, cap_t *cap, return rc; }+static void shutdown_tpm_tis(struct tpm_chip *tpm)+{ + int i; + + printk("Shutting down tpm_tis device\n"); + + iowrite32(TPM_INT_ENABLE(tpm, tpm->locality), ~TPM_GLOBAL_INT_ENABLE); + + /* Unmap all of the mmio pages */ + for ( i = 0; i < 5; ++i ) + { + if ( tpm->pages[i] != NULL ) + { + iounmap(tpm->pages[i], PAGE_SIZE); + tpm->pages[i] = NULL; + } + } + free(tpm); + return;Seeing as the function is moving anyway, this spurious return can go too. Yes. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |