提交 2eb5ebd3 编写于 作者: J Junchang Wang 提交者: Jesse Barnes

PCI: check return value of pci_enable_device() when enabling bridges

pci_enable_device can fail. In that case, a printed warning would be
more appropriate.
Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
Signed-off-by: NJunchang Wang <junchangwang@gmail.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 7736a05a
......@@ -240,6 +240,8 @@ void pci_enable_bridges(struct pci_bus *bus)
if (dev->subordinate) {
if (!pci_is_enabled(dev)) {
retval = pci_enable_device(dev);
if (retval)
dev_err(&dev->dev, "Error enabling bridge (%d), continuing\n", retval);
pci_set_master(dev);
}
pci_enable_bridges(dev->subordinate);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册