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:
Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
Loading
Please sign in to comment