if (++count >= PRD_ENTRIES) {
                                printk(KERN_WARNING "%s: DMA table too small\n",
                                       drive->name);
-                               goto use_pio_instead;
+                               return 0;
                        }
 
                        /* Lets enable intr for the last descriptor only */
        if (count)
                return 1;
 
- use_pio_instead:
-       ide_destroy_dmatable(drive);
-
        return 0; /* revert to PIO for this request */
 }
 
 
 static int auide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
 {
-       if (auide_build_dmatable(drive, cmd) == 0) {
-               ide_map_sg(drive, cmd);
+       if (auide_build_dmatable(drive, cmd) == 0)
                return 1;
-       }
 
        drive->waiting_for_dma = 1;
        return 0;
 
        printk(KERN_ERR "%s: %s\n", drive->name,
                count ? "DMA table too small" : "empty DMA table?");
 
-       ide_destroy_dmatable(drive);
-
        return 0; /* revert to PIO for this request */
 }
 EXPORT_SYMBOL_GPL(ide_build_dmatable);
 
 
        if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
            (dma_ops->dma_check && dma_ops->dma_check(drive, cmd)) ||
-           ide_build_sglist(drive, cmd) == 0 ||
-           dma_ops->dma_setup(drive, cmd))
+           ide_build_sglist(drive, cmd) == 0)
                return 1;
+       if (dma_ops->dma_setup(drive, cmd)) {
+               ide_destroy_dmatable(drive);
+               ide_map_sg(drive, cmd);
+               return 1;
+       }
        return 0;
 }
 
                                       "switching to PIO on Ohare chipset\n", drive->name);
                                pmif->broken_dma_warn = 1;
                        }
-                       goto use_pio_instead;
+                       return 0;
                }
                while (cur_len) {
                        unsigned int tc = (cur_len < 0xfe00)? cur_len: 0xfe00;
                        if (count++ >= MAX_DCMDS) {
                                printk(KERN_WARNING "%s: DMA table too small\n",
                                       drive->name);
-                               goto use_pio_instead;
+                               return 0;
                        }
                        st_le16(&table->command, wr? OUTPUT_MORE: INPUT_MORE);
                        st_le16(&table->req_count, tc);
 
        printk(KERN_DEBUG "%s: empty DMA table?\n", drive->name);
 
-use_pio_instead:
-       ide_destroy_dmatable(drive);
-
        return 0; /* revert to PIO for this request */
 }
 
        u8 unit = drive->dn & 1, ata4 = (pmif->kind == controller_kl_ata4);
        u8 write = !!(cmd->tf_flags & IDE_TFLAG_WRITE);
 
-       if (pmac_ide_build_dmatable(drive, cmd) == 0) {
-               ide_map_sg(drive, cmd);
+       if (pmac_ide_build_dmatable(drive, cmd) == 0)
                return 1;
-       }
 
        /* Apple adds 60ns to wrDataSetup on reads */
        if (ata4 && (pmif->timings[unit] & TR_66_UDMA_EN)) {
 
        u8 dma_stat;
 
        /* fall back to pio! */
-       if (ide_build_dmatable(drive, cmd) == 0) {
-               ide_map_sg(drive, cmd);
+       if (ide_build_dmatable(drive, cmd) == 0)
                return 1;
-       }
 
        /* PRD table */
        out_be32((void __iomem *)(hwif->dma_base + 8), hwif->dmatable_dma);
 
                                printk(KERN_WARNING
                                       "%s: DMA table too small\n",
                                       drive->name);
-                               goto use_pio_instead;
+                               return 0;
                        } else {
                                u32 bcount =
                                    0x10000 - (cur_addr & 0xffff);
                return count;
        }
 
-use_pio_instead:
-       ide_destroy_dmatable(drive);
-
        return 0;               /* revert to PIO for this request */
 }
 
        int ddir;
        u8 write = !!(cmd->tf_flags & IDE_TFLAG_WRITE);
 
-       if (sgiioc4_build_dmatable(drive, cmd) == 0) {
+       if (sgiioc4_build_dmatable(drive, cmd) == 0)
                /* try PIO instead of DMA */
-               ide_map_sg(drive, cmd);
                return 1;
-       }
 
        if (write)
                /* Writes TO the IOC4 FROM Main Memory */
 
        unsigned int count, rw = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 1 : 2;
 
        count = ide_build_dmatable(drive, cmd);
-       if (count == 0) {
-               ide_map_sg(drive, cmd);
+       if (count == 0)
                /* try PIO instead of DMA */
                return 1;
-       }
+
        outl(hwif->dmatable_dma | rw, hwif->dma_base);
        drive->waiting_for_dma = 1;
        /* start DMA */
 
        printk(KERN_ERR "%s: %s\n", drive->name,
                count ? "DMA table too small" : "empty DMA table?");
 
-       ide_destroy_dmatable(drive);
-
        return 0; /* revert to PIO for this request */
 }
 #else
        u8 rw = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 0 : ATA_DMA_WR;
 
        /* fall back to PIO! */
-       if (tx4939ide_build_dmatable(drive, cmd) == 0) {
-               ide_map_sg(drive, cmd);
+       if (tx4939ide_build_dmatable(drive, cmd) == 0)
                return 1;
-       }
 
        /* PRD table */
        tx4939ide_writel(hwif->dmatable_dma, base, TX4939IDE_PRD_Ptr);