Skip to contentSkip to conversation

mmc: sdhci-pci: remove unnecessary pci_set_drvdata()

PATCH New Jingoo Han 1 participant 1 message Sep 23, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 mmc: sdhci-pci: 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/mmc/host/sdhci-pci.c |    2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-pci.c +0 -2
index d7d6bc8..f0d20f0 100644
@@ -1533,7 +1533,6 @@ static int sdhci_pci_probe(struct pci_dev *pdev,
 	return 0;
 
 free:
-	pci_set_drvdata(pdev, NULL);
 	kfree(chip);
 
 err:
@@ -1555,7 +1554,6 @@ static void sdhci_pci_remove(struct pci_dev *pdev)
 		for (i = 0; i < chip->num_slots; i++)
 			sdhci_pci_remove_slot(chip->slots[i]);
 
-		pci_set_drvdata(pdev, NULL);
 		kfree(chip);
 	}
 
Signature · 1 line
1.7.10.4