diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-30 10:26:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-30 10:26:45 -0400 |
commit | 05cd2544f4b64d9a9eca0d170191867495e01feb (patch) | |
tree | 10146fb79bba464bac6f620d03b8cd50285065b7 /lib/swiotlb.c | |
parent | 27f680adc65ca08bf72ed85d3a48d1ee70f77c7a (diff) | |
parent | a0601c8944dc08c2d349c24bd9c0b09c406229fc (diff) |
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r-- | lib/swiotlb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index f8eebd489149..78330c37a61b 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -497,8 +497,10 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, | |||
497 | printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016Lx\n", | 497 | printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016Lx\n", |
498 | (unsigned long long)*hwdev->dma_mask, | 498 | (unsigned long long)*hwdev->dma_mask, |
499 | (unsigned long long)dev_addr); | 499 | (unsigned long long)dev_addr); |
500 | panic("swiotlb_alloc_coherent: allocated memory is out of " | 500 | |
501 | "range for device"); | 501 | /* DMA_TO_DEVICE to avoid memcpy in unmap_single */ |
502 | unmap_single(hwdev, ret, size, DMA_TO_DEVICE); | ||
503 | return NULL; | ||
502 | } | 504 | } |
503 | *dma_handle = dev_addr; | 505 | *dma_handle = dev_addr; |
504 | return ret; | 506 | return ret; |