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....@samsung.com> --- drivers/media/pci/dm1105/dm1105.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c index ab797fe..e985e3b 100644 --- a/drivers/media/pci/dm1105/dm1105.c +++ b/drivers/media/pci/dm1105/dm1105.c @@ -1178,7 +1178,6 @@ err_pci_release_regions: err_pci_disable_device: pci_disable_device(pdev); err_kfree: - pci_set_drvdata(pdev, NULL); kfree(dev); return ret; } @@ -1211,7 +1210,6 @@ static void dm1105_remove(struct pci_dev *pdev) pci_iounmap(pdev, dev->io_mem); pci_release_regions(pdev); pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); dm1105_devcount--; kfree(dev); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html