Commit ce9736d4 authored by Tomoya's avatar Tomoya Committed by David S. Miller

pch_can: fix rmmod issue

Currently, when rmmod pch_can, kernel failure occurs.
The cause is pci_iounmap executed before pch_can_reset.
Thus pci_iounmap moves after pch_can_reset.
Signed-off-by: default avatarTomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eab743ed
...@@ -959,13 +959,13 @@ static void __devexit pch_can_remove(struct pci_dev *pdev) ...@@ -959,13 +959,13 @@ static void __devexit pch_can_remove(struct pci_dev *pdev)
struct pch_can_priv *priv = netdev_priv(ndev); struct pch_can_priv *priv = netdev_priv(ndev);
unregister_candev(priv->ndev); unregister_candev(priv->ndev);
pci_iounmap(pdev, priv->regs);
if (priv->use_msi) if (priv->use_msi)
pci_disable_msi(priv->dev); pci_disable_msi(priv->dev);
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
pch_can_reset(priv); pch_can_reset(priv);
pci_iounmap(pdev, priv->regs);
free_candev(priv->ndev); free_candev(priv->ndev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment