X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fmisc%2Fioc4.c;h=05172d2613d66d3f980c2b2c148bd40992c4e64d;hb=399f486286f44d55c4fff0e9cc5d712f2b443489;hp=6a5a05d1f3923d81ee54ce2df63a0e2fca7f4d37;hpb=5a84d159061d914c8dd4aa372ac6e9529c2be453;p=~andy%2Flinux diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index 6a5a05d1f39..05172d2613d 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c @@ -244,10 +244,11 @@ ioc4_variant(struct ioc4_driver_data *idd) idd->idd_pdev->bus->number == pdev->bus->number && 3 == PCI_SLOT(pdev->devfn)) found = 1; - pci_dev_put(pdev); } while (pdev && !found); - if (NULL != pdev) + if (NULL != pdev) { + pci_dev_put(pdev); return IOC4_VARIANT_IO9; + } /* IO10: Look for a Vitesse VSC 7174 at the same bus and slot 3. */ pdev = NULL; @@ -258,10 +259,11 @@ ioc4_variant(struct ioc4_driver_data *idd) idd->idd_pdev->bus->number == pdev->bus->number && 3 == PCI_SLOT(pdev->devfn)) found = 1; - pci_dev_put(pdev); } while (pdev && !found); - if (NULL != pdev) + if (NULL != pdev) { + pci_dev_put(pdev); return IOC4_VARIANT_IO10; + } /* PCI-RT: No SCSI/SATA controller will be present */ return IOC4_VARIANT_PCI_RT;