summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pci-dra7xx.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-10-06 21:33:07 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-10-12 05:02:00 +0300
commit03fa2ae184c3fff47bc455a4a176384e65b9c303 (patch)
treef3749390d35ec7f3e9c14ae1bf4136ae176261a2 /drivers/pci/host/pci-dra7xx.c
parent01856d1de4757f940e71bf7fddf01ae39e078121 (diff)
downloadlinux-03fa2ae184c3fff47bc455a4a176384e65b9c303.tar.xz
PCI: dra7xx: 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/pci-dra7xx.c')
-rw-r--r--drivers/pci/host/pci-dra7xx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 1c24f3411776..3d184f649105 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -418,12 +418,11 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
reg &= ~LTSSM_EN;
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD, reg);
- platform_set_drvdata(pdev, dra7xx);
-
ret = dra7xx_add_pcie_port(dra7xx, pdev);
if (ret < 0)
goto err_gpio;
+ platform_set_drvdata(pdev, dra7xx);
return 0;
err_gpio: