aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>2016-02-25 11:08:09 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-11 22:09:09 -0800
commitc8843b1f1d134f3e14cd357a74c2d1de52ccf884 (patch)
tree00e02e0317dbb07fb0c01601363c3f4af75fe74f
parentstaging: rdma: hfi1: Do not use | with a variable with value 0 (diff)
downloadwireguard-linux-c8843b1f1d134f3e14cd357a74c2d1de52ccf884.tar.xz
wireguard-linux-c8843b1f1d134f3e14cd357a74c2d1de52ccf884.zip
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: //<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>
-rw-r--r--drivers/staging/rdma/hfi1/pcie.c2
1 files changed, 0 insertions, 2 deletions
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);
}
/*