All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jassi Brar <jassisinghbrar@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, s-anna@ti.com, tony@atomide.com,
	omar.ramirez@copitl.com, loic.pallardy@st.com,
	lftan.linux@gmail.com, slapdau@yahoo.com.au,
	courtney.cavin@sonymobile.com, rafael.j.wysocki@intel.com,
	robherring2@gmail.com, arnd@arndb.de, joshc@codeaurora.org,
	linus.walleij@linaro.org, galak@codeaurora.org,
	ks.giri@samsung.com, Jassi Brar <jaswinder.singh@linaro.org>
Subject: [PATCHv4 5/5] mailbox: Fix deleteing poll timer
Date: Wed, 19 Mar 2014 00:16:39 +0530	[thread overview]
Message-ID: <1395168399-29237-1-git-send-email-jaswinder.singh@linaro.org> (raw)
In-Reply-To: <1395168169-28978-1-git-send-email-jaswinder.singh@linaro.org>

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 cdf7d45..d080fc3 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -584,7 +584,8 @@ void mbox_controller_unregister(struct mbox_controller *mbox)
 	list_for_each_entry(chan, &con->channels, node)
 		mbox_free_channel(chan);
 
-	del_timer_sync(&con->poll);
+	if (mbox->txdone_poll)
+		del_timer_sync(&con->poll);
 
 	kfree(con);
 }
-- 
1.8.1.2


  parent reply	other threads:[~2014-03-18 18:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 18:42 [PATCHv4 0/5] Common Mailbox Framework Jassi Brar
2014-03-18 18:44 ` [PATCHv4 1/5] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-03-18 18:45 ` [PATCHv4 2/5] mailbox: Introduce framework for mailbox Jassi Brar
2014-03-19  4:00   ` Girish KS
2014-03-19  5:20     ` Jassi Brar
2014-03-19  6:02       ` Girish KS
2014-03-28 22:08   ` [PATCHv4,2/5] " Markus Mayer
2014-03-29  3:54     ` Jassi Brar
2014-03-31 22:05       ` Markus Mayer
2014-03-18 18:45 ` [PATCHv4 3/5] mailbox: pl320: Introduce common API driver Jassi Brar
2014-03-18 19:10   ` Rob Herring
2014-03-19  5:40     ` Jassi Brar
2014-03-18 18:46 ` [PATCHv4 4/5] mailbox: Fix TX completion init Jassi Brar
2014-03-18 18:46 ` Jassi Brar [this message]
2014-03-27 22:51 ` [PATCHv4 1/5] mailbox: rename pl320-ipc specific mailbox.h Markus Mayer
2014-03-29  3:55   ` Jassi Brar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395168399-29237-1-git-send-email-jaswinder.singh@linaro.org \
    --to=jassisinghbrar@gmail.com \
    --cc=arnd@arndb.de \
    --cc=courtney.cavin@sonymobile.com \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=joshc@codeaurora.org \
    --cc=ks.giri@samsung.com \
    --cc=lftan.linux@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=omar.ramirez@copitl.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robherring2@gmail.com \
    --cc=s-anna@ti.com \
    --cc=slapdau@yahoo.com.au \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.