summaryrefslogtreecommitdiffstats
path: root/drivers/pci/host/pcie-iproc-platform.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-10-06 13:36:08 -0500
committerBjorn Helgaas <bhelgaas@google.com>2016-10-11 22:36:38 -0500
commit556c7bb7df367ada8833c9d78df48943e4826413 (patch)
tree888df82ce8b13512e050d0103561be453de55006 /drivers/pci/host/pcie-iproc-platform.c
parent786aeccb4ac65b2071d2f790b4957819c389c9a9 (diff)
downloadlinux-stable-556c7bb7df367ada8833c9d78df48943e4826413.tar.gz
linux-stable-556c7bb7df367ada8833c9d78df48943e4826413.tar.bz2
linux-stable-556c7bb7df367ada8833c9d78df48943e4826413.zip
PCI: iproc: Set drvdata at end of probe function
Set the drvdata pointer at the end of probe function for consistency with other drivers. We don't need the drvdata until after the probe completes, and we don't need it at all if the probe fails. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host/pcie-iproc-platform.c')
-rw-r--r--drivers/pci/host/pcie-iproc-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c
index 6030dc1644d2..a3de087976b3 100644
--- a/drivers/pci/host/pcie-iproc-platform.c
+++ b/drivers/pci/host/pcie-iproc-platform.c
@@ -59,7 +59,6 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
pcie->dev = dev;
pcie->type = (enum iproc_pcie_type)of_id->data;
- platform_set_drvdata(pdev, pcie);
ret = of_address_to_resource(np, 0, &reg);
if (ret < 0) {
@@ -124,6 +123,7 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
pci_free_resource_list(&res);
+ platform_set_drvdata(pdev, pcie);
return ret;
}