can: c_can: fix segfault during rmmod
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
@@ -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
Marc Kleine-Budde
maintainerQuoted 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 inc_can_startandc_can_stop, so removing fromunregister_c_can_dev().Signed-off-by AnilKumar Ch <[email protected]>
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 |