diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2016-02-25 08:37:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-12 09:09:09 +0300 |
commit | fad2564eaa350368d95be2b7f0c832541dc9d09a (patch) | |
tree | 0c564df800a06b244472422bcf9190d9cbc01e72 /drivers | |
parent | 732053a0a005397374e3afc54618ef5e3e524eed (diff) | |
download | linux-fad2564eaa350368d95be2b7f0c832541dc9d09a.tar.xz |
staging: sm750fb: 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:
//<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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/sm750fb/sm750.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 59c74557a0a7..aae3c7538d68 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1135,7 +1135,6 @@ static void lynxfb_pci_remove(struct pci_dev *pdev) iounmap(sm750_dev->pvMem); kfree(g_settings); kfree(sm750_dev); - pci_set_drvdata(pdev, NULL); } static int __init lynxfb_setup(char *options) |