summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/pnp/resource.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 41d73a5e931..e50ebcffb96 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -367,8 +367,10 @@ int pnp_check_irq(struct pnp_dev *dev, int idx)
{
struct pci_dev *pci = NULL;
for_each_pci_dev(pci) {
- if (pci->irq == *irq)
+ if (pci->irq == *irq) {
+ pci_dev_put(pci);
return 0;
+ }
}
}
#endif