aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeyFoon Tan <lftan.linux@gmail.com>2014-06-12 22:32:22 +0530
committerShow Liu <show.liu@linaro.org>2014-06-18 12:05:34 +0800
commit32dc140ac992dccd3b5054085a977978e4406d17 (patch)
tree6f965bf240153ec2e163888e60d4e62a5fc4bb2d
parentf33c8f5e363b2edbdb9ba359355b34688cd069cb (diff)
downloadlinaro-lsk-32dc140ac992dccd3b5054085a977978e4406d17.tar.gz
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 336fa10c1a3..ae4abd9f751 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);
}