[PATCHv3 5/6] mailbox: Fix deleteing poll timer

Jassi Brar
2014-02-15T18:27:01Z

From: LeyFoon Tan <lftan.linux@gmail.com>

Try to delete the timer only if it was init/used.

Signed-off-by: LeyFoon Tan <lftan.linux@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
drivers/mailbox/mailbox.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index f8b31da..bac767e 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -529,7 +529,8 @@ void ipc_links_unregister(struct ipc_controller *ipc)
list_for_each_entry(chan, &con->channels, node)
ipc_free_channel((void *)chan);

- del_timer_sync(&con->poll);
+ if (ipc->txdone_poll)
+ del_timer_sync(&con->poll);

kfree(con);
}
--
1.8.1.2