diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-08-20 16:42:56 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-08-20 16:42:56 -0400 |
commit | 88b47040f8365ad56ecfd4103e964ba9b695987e (patch) | |
tree | 861e91d67f275cbeaed2beb34a5d705a40dbdae2 /drivers | |
parent | e98d6e50be87c1ad2df81f73c7442cf631d6f931 (diff) |
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.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/triflex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 024bbfae0429..098692a6d615 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -115,6 +115,9 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif) | |||
115 | hwif->tuneproc = &triflex_tune_drive; | 115 | hwif->tuneproc = &triflex_tune_drive; |
116 | hwif->speedproc = &triflex_tune_chipset; | 116 | hwif->speedproc = &triflex_tune_chipset; |
117 | 117 | ||
118 | if (hwif->dma_base == 0) | ||
119 | return; | ||
120 | |||
118 | hwif->atapi_dma = 1; | 121 | hwif->atapi_dma = 1; |
119 | hwif->mwdma_mask = 0x07; | 122 | hwif->mwdma_mask = 0x07; |
120 | hwif->swdma_mask = 0x07; | 123 | hwif->swdma_mask = 0x07; |