diff options
-rw-r--r-- | arch/x86/kernel/pci-dma_32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c index f134de3833a..d2f70744a93 100644 --- a/arch/x86/kernel/pci-dma_32.c +++ b/arch/x86/kernel/pci-dma_32.c @@ -91,6 +91,9 @@ void *dma_alloc_coherent(struct device *dev, size_t size, if (dma_mask == 0) dma_mask = DMA_32BIT_MASK; + if (dev->dma_mask == NULL) + return NULL; + /* Don't invoke OOM killer */ gfp |= __GFP_NORETRY; again: |