triflex: add missing ->dma_base check
PATCH 8/12 triflex: add missing ->dma_base check
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(+)
drivers/ide/pci/triflex.c +3 -0
@@ -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 ;
Quoted 4 lines · Bartlomiej Zolnierkiewicz
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]>
Acked-by Sergei Shtylyov <[email protected]>
MBR, Sergei