Commit ce300008 authored by Bjorn Helgaas's avatar Bjorn Helgaas

PCI: Remove unnecessary list_empty(&pci_pme_list) check

list_for_each_entry() handles empty lists just fine, so there's no need to
check whether the list is empty first.

No functional change.
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rjw@rjwysocki.net>
parent 38dbfb59
...@@ -1611,7 +1611,6 @@ static void pci_pme_list_scan(struct work_struct *work) ...@@ -1611,7 +1611,6 @@ static void pci_pme_list_scan(struct work_struct *work)
struct pci_pme_device *pme_dev, *n; struct pci_pme_device *pme_dev, *n;
mutex_lock(&pci_pme_list_mutex); mutex_lock(&pci_pme_list_mutex);
if (!list_empty(&pci_pme_list)) {
list_for_each_entry_safe(pme_dev, n, &pci_pme_list, list) { list_for_each_entry_safe(pme_dev, n, &pci_pme_list, list) {
if (pme_dev->dev->pme_poll) { if (pme_dev->dev->pme_poll) {
struct pci_dev *bridge; struct pci_dev *bridge;
...@@ -1633,7 +1632,6 @@ static void pci_pme_list_scan(struct work_struct *work) ...@@ -1633,7 +1632,6 @@ static void pci_pme_list_scan(struct work_struct *work)
if (!list_empty(&pci_pme_list)) if (!list_empty(&pci_pme_list))
schedule_delayed_work(&pci_pme_work, schedule_delayed_work(&pci_pme_work,
msecs_to_jiffies(PME_TIMEOUT)); msecs_to_jiffies(PME_TIMEOUT));
}
mutex_unlock(&pci_pme_list_mutex); mutex_unlock(&pci_pme_list_mutex);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment