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>
return -ENOMEM;
pcie->dev = dev;
- bcma_set_drvdata(bdev, pcie);
pcie->base = bdev->io_addr;
pcie->base_addr = bdev->addr;
pci_free_resource_list(&res);
+ bcma_set_drvdata(bdev, pcie);
return ret;
}
pcie->dev = dev;
pcie->type = (enum iproc_pcie_type)of_id->data;
- platform_set_drvdata(pdev, pcie);
ret = of_address_to_resource(np, 0, ®);
if (ret < 0) {
pci_free_resource_list(&res);
+ platform_set_drvdata(pdev, pcie);
return ret;
}