aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 05fa91a31c62..ce7dd6e7be60 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -246,9 +246,9 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
246 } 246 }
247 dev = NULL; 247 dev = NULL;
248exit: 248exit:
249 pci_dev_put(from);
250 dev = pci_dev_get(dev); 249 dev = pci_dev_get(dev);
251 spin_unlock(&pci_bus_lock); 250 spin_unlock(&pci_bus_lock);
251 pci_dev_put(from);
252 return dev; 252 return dev;
253} 253}
254 254
@@ -339,9 +339,9 @@ struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from)
339 } 339 }
340 dev = NULL; 340 dev = NULL;
341exit: 341exit:
342 pci_dev_put(from);
343 dev = pci_dev_get(dev); 342 dev = pci_dev_get(dev);
344 spin_unlock(&pci_bus_lock); 343 spin_unlock(&pci_bus_lock);
344 pci_dev_put(from);
345 return dev; 345 return dev;
346} 346}
347 347