linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AnilKumar Ch <anilkumar@ti.com>
To: wg@grandegger.com, mkl@pengutronix.de
Cc: swarren@wwwdotorg.org, linux-can@vger.kernel.org,
	anantgole@ti.com, nsekhar@ti.com, AnilKumar Ch <anilkumar@ti.com>
Subject: [PATCH] can: c_can: fix segfault during rmmod
Date: Thu, 27 Sep 2012 17:54:58 +0530	[thread overview]
Message-ID: <1348748698-5635-1-git-send-email-anilkumar@ti.com> (raw)

This patch fixes an oops which occurs during unloading the driver.
unregister_c_can_dev() is doing c_can/d_can module interrupts
disable, which requires module clock enable. c_can/d_can interrupts
enable/disable is handled properly in c_can_start and c_can_stop,
so removing from unregister_c_can_dev().

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 drivers/net/can/c_can/c_can.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 25f4356..7a2a7e4 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -1282,9 +1282,6 @@ void unregister_c_can_dev(struct net_device *dev)
 {
 	struct c_can_priv *priv = netdev_priv(dev);
 
-	/* disable all interrupts */
-	c_can_enable_all_interrupts(priv, DISABLE_ALL_INTERRUPTS);
-
 	unregister_candev(dev);
 
 	c_can_pm_runtime_disable(priv);
-- 
1.7.9.5


             reply	other threads:[~2012-09-27 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 12:24 AnilKumar Ch [this message]
2012-09-27 14:43 ` [PATCH] can: c_can: fix segfault during rmmod Marc Kleine-Budde
  -- strict thread matches above, loose matches on Subject: below --
2012-09-27 10:41 AnilKumar Ch
2012-09-27 11:11 ` Marc Kleine-Budde
2012-09-27 11:22   ` AnilKumar, Chimata

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=1348748698-5635-1-git-send-email-anilkumar@ti.com \
    --to=anilkumar@ti.com \
    --cc=anantgole@ti.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=nsekhar@ti.com \
    --cc=swarren@wwwdotorg.org \
    --cc=wg@grandegger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).