diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-25 21:56:33 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-25 21:56:33 -0400 |
commit | 29da9f6d9cc3685ae7f6c8b817f6ed8864c78a4c (patch) | |
tree | 3c99d228ea364fb9c85f50227a49aa8264589ede /drivers/ata/sata_sis.c | |
parent | c32a8fd7cb33f30bcd855188dc8e243b144c5cee (diff) |
[libata] Fix oops introduced in non-uniform port handling fix
Noticed by several people.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_sis.c')
-rw-r--r-- | drivers/ata/sata_sis.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 9b17375d8056..18d49fff8dc4 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
@@ -240,7 +240,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
240 | struct ata_probe_ent *probe_ent = NULL; | 240 | struct ata_probe_ent *probe_ent = NULL; |
241 | int rc; | 241 | int rc; |
242 | u32 genctl; | 242 | u32 genctl; |
243 | struct ata_port_info *ppi; | 243 | struct ata_port_info *ppi[2]; |
244 | int pci_dev_busy = 0; | 244 | int pci_dev_busy = 0; |
245 | u8 pmr; | 245 | u8 pmr; |
246 | u8 port2_start; | 246 | u8 port2_start; |
@@ -265,8 +265,8 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
265 | if (rc) | 265 | if (rc) |
266 | goto err_out_regions; | 266 | goto err_out_regions; |
267 | 267 | ||
268 | ppi = &sis_port_info; | 268 | ppi[0] = ppi[1] = &sis_port_info; |
269 | probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); | 269 | probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); |
270 | if (!probe_ent) { | 270 | if (!probe_ent) { |
271 | rc = -ENOMEM; | 271 | rc = -ENOMEM; |
272 | goto err_out_regions; | 272 | goto err_out_regions; |