[PATCH 3/3] mmc: sdhci-pci: remove unnecessary pci_set_drvdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 drivers/mmc/host/sdhci-pci.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 8f75381..9f66f73 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -1609,7 +1609,6 @@ static int sdhci_pci_probe(struct pci_dev *pdev,
 	return 0;
 
 free:
-	pci_set_drvdata(pdev, NULL);
 	kfree(chip);
 
 err:
@@ -1631,7 +1630,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);
 	}
 
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux