提交 3323ab8f 编写于 作者: B Bjorn Helgaas

x86/PCI: Remove unnecessary list_empty(&pci_root_infos) check

list_for_each_entry() handles empty lists, so there's no need to check
whether the list is empty first.
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 25453e9e
......@@ -10,9 +10,6 @@ static struct pci_root_info *x86_find_pci_root_info(int bus)
{
struct pci_root_info *info;
if (list_empty(&pci_root_infos))
return NULL;
list_for_each_entry(info, &pci_root_infos, list)
if (info->busn.start == bus)
return info;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册