mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 00:24:58 +08:00
wireless: orinoco: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
e53c61a055
commit
68351b5803
@ -234,7 +234,6 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
|
||||
free_irq(pdev->irq, priv);
|
||||
|
||||
fail_irq:
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
|
||||
fail_alloc:
|
||||
@ -265,7 +264,6 @@ static void orinoco_nortel_remove_one(struct pci_dev *pdev)
|
||||
|
||||
orinoco_if_del(priv);
|
||||
free_irq(pdev->irq, priv);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
pci_iounmap(pdev, priv->hw.iobase);
|
||||
pci_iounmap(pdev, card->attr_io);
|
||||
|
@ -184,7 +184,6 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
|
||||
free_irq(pdev->irq, priv);
|
||||
|
||||
fail_irq:
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
|
||||
fail_alloc:
|
||||
@ -205,7 +204,6 @@ static void orinoco_pci_remove_one(struct pci_dev *pdev)
|
||||
|
||||
orinoco_if_del(priv);
|
||||
free_irq(pdev->irq, priv);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
pci_iounmap(pdev, priv->hw.iobase);
|
||||
pci_release_regions(pdev);
|
||||
|
@ -273,7 +273,6 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
|
||||
free_irq(pdev->irq, priv);
|
||||
|
||||
fail_irq:
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
|
||||
fail_alloc:
|
||||
@ -301,7 +300,6 @@ static void orinoco_plx_remove_one(struct pci_dev *pdev)
|
||||
|
||||
orinoco_if_del(priv);
|
||||
free_irq(pdev->irq, priv);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
pci_iounmap(pdev, priv->hw.iobase);
|
||||
pci_iounmap(pdev, card->attr_io);
|
||||
|
@ -170,7 +170,6 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
|
||||
free_irq(pdev->irq, priv);
|
||||
|
||||
fail_irq:
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
|
||||
fail_alloc:
|
||||
@ -195,7 +194,6 @@ static void orinoco_tmd_remove_one(struct pci_dev *pdev)
|
||||
|
||||
orinoco_if_del(priv);
|
||||
free_irq(pdev->irq, priv);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
free_orinocodev(priv);
|
||||
pci_iounmap(pdev, priv->hw.iobase);
|
||||
pci_iounmap(pdev, card->bridge_io);
|
||||
|
Loading…
Reference in New Issue
Block a user