Skip to contentSkip to conversation

irda: via-ircc: remove unnecessary pci_set_drvdata()

PATCH Applied Jingoo Han 2 participants 4 messages Dec 9, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 irda: via-ircc: 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.

---
 drivers/net/irda/via-ircc.c |    2 --
 1 file changed, 2 deletions(-)
drivers/net/irda/via-ircc.c +0 -2
index 26cb45d..2900af0 100644
@@ -407,7 +407,6 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id)
  err_out2:
 	release_region(self->io.fir_base, self->io.fir_ext);
  err_out1:
-	pci_set_drvdata(pdev, NULL);
 	free_netdev(dev);
 	return err;
 }
@@ -441,7 +440,6 @@ static void via_remove_one(struct pci_dev *pdev)
 	if (self->rx_buff.head)
 		dma_free_coherent(&pdev->dev, self->rx_buff.truesize,
 				  self->rx_buff.head, self->rx_buff_dma);
-	pci_set_drvdata(pdev, NULL);
 
 	free_netdev(self->netdev);
 
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 irda: vlsi_ir: 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.

---
 drivers/net/irda/vlsi_ir.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/net/irda/vlsi_ir.c +0 -3
index cc9b866..4850066 100644
@@ -1693,7 +1693,6 @@ out_freedev:
 out_disable:
 	pci_disable_device(pdev);
 out:
-	pci_set_drvdata(pdev, NULL);
 	return -ENODEV;
 }
 
@@ -1719,8 +1718,6 @@ static void vlsi_irda_remove(struct pci_dev *pdev)
 
 	free_netdev(ndev);
 
-	pci_set_drvdata(pdev, NULL);
-
 	IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev));
 }
 
Signature · 1 line
1.7.10.4
maintainer Applied
#2 lore raw

Re: [PATCH 2/2] irda: vlsi_ir: remove unnecessary pci_set_drvdata()

From: Jingoo Han <[email protected]>
Date: Mon, 09 Dec 2013 12:29:08 +0900

Quoted 5 lines

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.

Applied.