aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 68aeeb7206de..ef18fcd641e2 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -422,7 +422,7 @@ int pci_proc_detach_device(struct pci_dev *dev)
422 struct proc_dir_entry *e; 422 struct proc_dir_entry *e;
423 423
424 if ((e = dev->procent)) { 424 if ((e = dev->procent)) {
425 if (atomic_read(&e->count)) 425 if (atomic_read(&e->count) > 1)
426 return -EBUSY; 426 return -EBUSY;
427 remove_proc_entry(e->name, dev->bus->procdir); 427 remove_proc_entry(e->name, dev->bus->procdir);
428 dev->procent = NULL; 428 dev->procent = NULL;