Thread (20 messages) 20 messages, 5 authors, 2014-06-30

[PATCHv7 4/5] mailbox: Fix deleteing poll timer

flat view
STALE4497d SUPERSEDED

From: Jassi Brar <hidden>
Date: 2014-06-12 17:02:48
Also in: lkml
Subsystem: mailbox api, the rest · Maintainers: Jassi Brar, Linus Torvalds

Revision v7 of 3 in this series.

Revisions (3)
  1. v7 current
  2. v9 [diff vs current]
  3. v10 [diff vs current]
From: LeyFoon Tan <redacted>

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

Signed-off-by: LeyFoon Tan <redacted>
Signed-off-by: Jassi Brar <redacted>
---
 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 336fa10..ae4abd9 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);
 }
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help