Skip to content
Commit c7d9cc1f authored by Marouen Ghodhbane's avatar Marouen Ghodhbane Committed by Benjamin Cabé
Browse files

drivers: counter: tpm: fix init sequence



The current code is enabling the IRQ before calling the TPM_Init()
function which (beside being incorrect by design) opens the door to a
spurious irq to cause the isr function call before the init.  This
corner case can be easily observed for example when running the code
inside a hypervisor/jailhouse where restarting the cell without
previous proper exit (device deinit) can cause a crash (null pointer
dereference) when an IRQ is triggered before the init.

Signed-off-by: default avatarMarouen Ghodhbane <marouen.ghodhbane@nxp.com>
parent 8cff70a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment