]> Pileus Git - ~andy/linux/commitdiff
can: c_can: fix segfault during rmmod
authorAnilKumar Ch <anilkumar@ti.com>
Thu, 27 Sep 2012 12:24:58 +0000 (17:54 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 27 Sep 2012 14:34:02 +0000 (16:34 +0200)
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().

The problem was triggered by adding runtime PM support to the c_can driver by
this commit:

4cdd34b can: c_can: Add runtime PM support to Bosch C_CAN/D_CAN controller

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c

index 2c4a21f9844211f72675e44bbf04b833b513a458..e5180dfddba54dc6918b8dbb3e2c8643316e130b 100644 (file)
@@ -1265,9 +1265,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);