From: Tomoya Date: Mon, 7 Feb 2011 23:29:02 +0000 (+0000) Subject: pch_can: fix rmmod issue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce9736d4fb48beed370e22ac156779746dda7b92;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Tomoya MORINAGA Signed-off-by: David S. Miller --- diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c index 9b171d12f793..342d514c5e84 100644 --- a/drivers/net/can/pch_can.c +++ b/drivers/net/can/pch_can.c @@ -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); }