diff options
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 45806336ce02..7b3bd34faf47 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -184,7 +184,7 @@ static int adpt_detect(struct scsi_host_template* sht) | |||
184 | PINFO("Detecting Adaptec I2O RAID controllers...\n"); | 184 | PINFO("Detecting Adaptec I2O RAID controllers...\n"); |
185 | 185 | ||
186 | /* search for all Adatpec I2O RAID cards */ | 186 | /* search for all Adatpec I2O RAID cards */ |
187 | while ((pDev = pci_find_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { | 187 | while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { |
188 | if(pDev->device == PCI_DPT_DEVICE_ID || | 188 | if(pDev->device == PCI_DPT_DEVICE_ID || |
189 | pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ | 189 | pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ |
190 | if(adpt_install_hba(sht, pDev) ){ | 190 | if(adpt_install_hba(sht, pDev) ){ |
@@ -192,8 +192,11 @@ static int adpt_detect(struct scsi_host_template* sht) | |||
192 | PERROR("Will not try to detect others.\n"); | 192 | PERROR("Will not try to detect others.\n"); |
193 | return hba_count-1; | 193 | return hba_count-1; |
194 | } | 194 | } |
195 | pci_dev_get(pDev); | ||
195 | } | 196 | } |
196 | } | 197 | } |
198 | if (pDev) | ||
199 | pci_dev_put(pDev); | ||
197 | 200 | ||
198 | /* In INIT state, Activate IOPs */ | 201 | /* In INIT state, Activate IOPs */ |
199 | for (pHba = hba_chain; pHba; pHba = pHba->next) { | 202 | for (pHba = hba_chain; pHba; pHba = pHba->next) { |
@@ -1075,6 +1078,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) | |||
1075 | } | 1078 | } |
1076 | } | 1079 | } |
1077 | } | 1080 | } |
1081 | pci_dev_put(pHba->pDev); | ||
1078 | kfree(pHba); | 1082 | kfree(pHba); |
1079 | 1083 | ||
1080 | if(hba_count <= 0){ | 1084 | if(hba_count <= 0){ |