diff options
author | LeyFoon Tan <lftan.linux@gmail.com> | 2014-06-12 22:32:22 +0530 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-13 11:28:14 +0100 |
commit | b48f08e4efb575f03ebf782f4ebba41d59929b8a (patch) | |
tree | a373579acfe4699902e302572c04138efe4c0c3a | |
parent | 9bc18778c4ed062420ba22d321672d9b302be5f5 (diff) |
mailbox: Fix deleteing poll timer
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/mailbox/mailbox.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 336fa10c1a38..ae4abd9f7513 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -480,7 +480,8 @@ void mbox_controller_unregister(struct mbox_controller *mbox) for (i = 0; i < mbox->num_chans; i++) mbox_free_channel(&mbox->chans[i]); - del_timer_sync(&mbox->poll); + if (mbox->txdone_poll) + del_timer_sync(&mbox->poll); mutex_unlock(&con_mutex); } |