From: Amitoj Kaur Chawla Date: Thu, 25 Feb 2016 05:38:09 +0000 (+0530) Subject: staging: rdma: hfi1: Remove unnecessary pci_set_drvdata() X-Git-Tag: v4.6-rc1~103^2~26 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=c8843b1f1d134f3e14cd357a74c2d1de52ccf884;p=linux.git staging: rdma: hfi1: 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 --- diff --git a/drivers/staging/rdma/hfi1/pcie.c b/drivers/staging/rdma/hfi1/pcie.c index b2f553d86042..47ca6314e328 100644 --- a/drivers/staging/rdma/hfi1/pcie.c +++ b/drivers/staging/rdma/hfi1/pcie.c @@ -247,8 +247,6 @@ void hfi1_pcie_ddcleanup(struct hfi1_devdata *dd) iounmap(dd->rcvarray_wc); if (dd->piobase) iounmap(dd->piobase); - - pci_set_drvdata(dd->pcidev, NULL); } /*