If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
shouldn't be initialized or bad things will happen.

Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/triflex.c |    3 +++
 1 file changed, 3 insertions(+)

Index: b/drivers/ide/pci/triflex.c
===================================================================
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -111,6 +111,9 @@ static void __devinit init_hwif_triflex(
        hwif->set_pio_mode = &triflex_set_pio_mode;
        hwif->set_dma_mode = &triflex_set_mode;
 
+       if (hwif->dma_base == 0)
+               return;
+
        hwif->atapi_dma  = 1;
        hwif->mwdma_mask = 0x07;
        hwif->swdma_mask = 0x07;
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to