mirror of
https://github.com/torvalds/linux.git
synced 2024-09-27 10:23:00 +00:00
ipw2100: remove useless tests in the PCI device remove path.
Everything has been set up in the PCI probe function. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
This commit is contained in:
parent
9b717075e9
commit
019d077a53
|
@ -6421,16 +6421,13 @@ out:
|
||||||
static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
|
static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
|
||||||
{
|
{
|
||||||
struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
|
struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
|
||||||
struct net_device *dev;
|
struct net_device *dev = priv->net_dev;
|
||||||
|
|
||||||
if (priv) {
|
|
||||||
mutex_lock(&priv->action_mutex);
|
mutex_lock(&priv->action_mutex);
|
||||||
|
|
||||||
priv->status &= ~STATUS_INITIALIZED;
|
priv->status &= ~STATUS_INITIALIZED;
|
||||||
|
|
||||||
dev = priv->net_dev;
|
sysfs_remove_group(&pci_dev->dev.kobj, &ipw2100_attribute_group);
|
||||||
sysfs_remove_group(&pci_dev->dev.kobj,
|
|
||||||
&ipw2100_attribute_group);
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
if (ipw2100_firmware.version)
|
if (ipw2100_firmware.version)
|
||||||
|
@ -6445,7 +6442,8 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
|
||||||
|
|
||||||
/* Unregister the device first - this results in close()
|
/* Unregister the device first - this results in close()
|
||||||
* being called if the device is open. If we free storage
|
* being called if the device is open. If we free storage
|
||||||
* first, then close() will crash. */
|
* first, then close() will crash.
|
||||||
|
* FIXME: remove the comment above. */
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
|
|
||||||
ipw2100_kill_works(priv);
|
ipw2100_kill_works(priv);
|
||||||
|
@ -6455,7 +6453,6 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
|
||||||
/* Free potential debugging firmware snapshot */
|
/* Free potential debugging firmware snapshot */
|
||||||
ipw2100_snapshot_free(priv);
|
ipw2100_snapshot_free(priv);
|
||||||
|
|
||||||
if (dev->irq)
|
|
||||||
free_irq(dev->irq, priv);
|
free_irq(dev->irq, priv);
|
||||||
|
|
||||||
pci_iounmap(pci_dev, priv->ioaddr);
|
pci_iounmap(pci_dev, priv->ioaddr);
|
||||||
|
@ -6464,7 +6461,6 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
|
||||||
wiphy_unregister(priv->ieee->wdev.wiphy);
|
wiphy_unregister(priv->ieee->wdev.wiphy);
|
||||||
kfree(priv->ieee->bg_band.channels);
|
kfree(priv->ieee->bg_band.channels);
|
||||||
free_libipw(dev, 0);
|
free_libipw(dev, 0);
|
||||||
}
|
|
||||||
|
|
||||||
pci_release_regions(pci_dev);
|
pci_release_regions(pci_dev);
|
||||||
pci_disable_device(pci_dev);
|
pci_disable_device(pci_dev);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user