Skip to content

Commit

Permalink
pch_can: fix rmmod issue
Browse files Browse the repository at this point in the history
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: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tomoya authored and David S. Miller committed Feb 9, 2011
1 parent eab743e commit ce9736d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/pch_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,13 +959,13 @@ static void __devexit pch_can_remove(struct pci_dev *pdev)
struct pch_can_priv *priv = netdev_priv(ndev);

unregister_candev(priv->ndev);
pci_iounmap(pdev, priv->regs);
if (priv->use_msi)
pci_disable_msi(priv->dev);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
pch_can_reset(priv);
pci_iounmap(pdev, priv->regs);
free_candev(priv->ndev);
}

Expand Down

0 comments on commit ce9736d

Please sign in to comment.