From fad2564eaa350368d95be2b7f0c832541dc9d09a Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Thu, 25 Feb 2016 11:07:37 +0530 Subject: [PATCH] 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: // @@ struct pci_dev *pci; @@ - pci_set_drvdata(pci, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sm750fb/sm750.c | 1 - 1 file changed, 1 deletion(-) 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)