Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35198234a26fdc0f858774e3ba143796323059a0
Commit:     35198234a26fdc0f858774e3ba143796323059a0
Parent:     0505b55fb51fa289027f33ae793995c191277536
Author:     Sergei Shtylyov <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 11 22:28:34 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Tue Sep 11 22:28:34 2007 +0200

    pdc202xx_new: fix PCI refcounting
    
    The driver erroneously "lets go" the mate IDE chip in init_setup_pdc20270()
    when ide_setup_pci_devices() call succeeds -- fix this, and drop a couple of
    useless assignments in this function while at it...
    
    Bart: keep "findev" variable initialization to silence gcc
    
    Signed-off-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/pdc202xx_new.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index f6db2f3..f74a02a 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -9,7 +9,7 @@
  *  Split from:
  *  linux/drivers/ide/pdc202xx.c       Version 0.35    Mar. 30, 2002
  *  Copyright (C) 1998-2002            Andre Hedrick <[EMAIL PROTECTED]>
- *  Copyright (C) 2005-2006            MontaVista Software, Inc.
+ *  Copyright (C) 2005-2007            MontaVista Software, Inc.
  *  Portions Copyright (C) 1999 Promise Technology, Inc.
  *  Author: Frank Tiernan ([EMAIL PROTECTED])
  *  Released under terms of General Public License
@@ -535,7 +535,7 @@ static int __devinit init_setup_pdc20270(struct pci_dev 
*dev,
            (dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) {
                if (PCI_SLOT(dev->devfn) & 2)
                        return -ENODEV;
-               d->extra = 0;
+
                while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, 
findev)) != NULL) {
                        if ((findev->vendor == dev->vendor) &&
                            (findev->device == dev->device) &&
@@ -544,7 +544,8 @@ static int __devinit init_setup_pdc20270(struct pci_dev 
*dev,
                                        findev->irq = dev->irq;
                                }
                                ret = ide_setup_pci_devices(dev, findev, d);
-                               pci_dev_put(findev);
+                               if (ret < 0)
+                                       pci_dev_put(findev);
                                return ret;
                        }
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to