mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Merge branch 'remotes/lorenzo/pci/kirin'
- Return -EPROBE_DEFER in case the gpio isn't ready (Bean Huo) * remotes/lorenzo/pci/kirin: PCI: kirin: Return -EPROBE_DEFER in case the gpio isn't ready
This commit is contained in:
commit
29828fc20a
1 changed files with 5 additions and 1 deletions
|
@ -508,8 +508,12 @@ static int kirin_pcie_probe(struct platform_device *pdev)
|
|||
|
||||
kirin_pcie->gpio_id_reset = of_get_named_gpio(dev->of_node,
|
||||
"reset-gpios", 0);
|
||||
if (kirin_pcie->gpio_id_reset < 0)
|
||||
if (kirin_pcie->gpio_id_reset == -EPROBE_DEFER) {
|
||||
return -EPROBE_DEFER;
|
||||
} else if (!gpio_is_valid(kirin_pcie->gpio_id_reset)) {
|
||||
dev_err(dev, "unable to get a valid gpio pin\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = kirin_pcie_power_on(kirin_pcie);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in a new issue