Commit 91a7c46e authored by Federico Vaga's avatar Federico Vaga

sw:drv: bugfix do nothing if nothing has been registered

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent eada2a9e
......@@ -191,6 +191,9 @@ void trtl_tty_remove(struct trtl_dev *trtl)
/* Disable the interrupts on the Mock Turtle */
trtl_iowrite(trtl, 0x0, trtl->base_csr + MT_CPU_CSR_REG_UART_IMSK);
if (!trtl->tty_driver)
return;
free_irq(platform_get_irq(pdev, TRTL_IRQ_CON), trtl);
for (i = 0; i < trtl->cfgrom.n_cpu; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment