]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rts5208: Remove unnecessary pci_set_drvdata()
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 25 Feb 2016 05:38:20 +0000 (11:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
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:
//<smpl>
@@
struct pci_dev *pci;
@@
- pci_set_drvdata(pci, NULL);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts5208/rtsx.c

index 5dfcdfb28307995f80017709b4538d1cf7d0d0f5..d23f8534472271c35502f16fed22ab2f6a86cf83 100644 (file)
@@ -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 */