Skip to contentSkip to conversation

can: c_can: fix segfault during rmmod

PATCH In review AnilKumar Ch 2 participants 2 messages Sep 27, 2012 CAN network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: c_can: fix segfault during rmmod

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().

---
 drivers/net/can/c_can/c_can.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/c_can/c_can.c +0 -3
index 25f4356..7a2a7e4 100644
@@ -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);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · AnilKumar Ch

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().

Thanks, I've added a reference to the commit that added the runtime pm support. I'll send a pull request to David soon.

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |