[libata] Fix oops introduced in non-uniform port handling fix
[powerpc.git] / drivers / ata / sata_sis.c
index 9b17375..18d49ff 100644 (file)
@@ -240,7 +240,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        struct ata_probe_ent *probe_ent = NULL;
        int rc;
        u32 genctl;
-       struct ata_port_info *ppi;
+       struct ata_port_info *ppi[2];
        int pci_dev_busy = 0;
        u8 pmr;
        u8 port2_start;
@@ -265,8 +265,8 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        if (rc)
                goto err_out_regions;
 
-       ppi = &sis_port_info;
-       probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY);
+       ppi[0] = ppi[1] = &sis_port_info;
+       probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY);
        if (!probe_ent) {
                rc = -ENOMEM;
                goto err_out_regions;