From b7a22f8d0a84c21ad0458c386f2fb2986702fa5d Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Thu, 25 Feb 2016 11:08:20 +0530 Subject: [PATCH] staging: rts5208: Remove unnecessary pci_set_drvdata() Unnecessary pci_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: // @@ struct pci_dev *pci; @@ - pci_set_drvdata(pci, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rts5208/rtsx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 5dfcdfb28307..d23f85344722 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -1009,8 +1009,6 @@ static void rtsx_remove(struct pci_dev *pci) quiesce_and_remove_host(dev); release_everything(dev); - - pci_set_drvdata(pci, NULL); } /* PCI IDs */ -- 2.34.1