projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf89c42
)
tile PCI DMA: handle a NULL dev argument properly
author
Chris Metcalf
<cmetcalf@tilera.com>
Mon, 5 Aug 2013 16:37:24 +0000
(12:37 -0400)
committer
Chris Metcalf
<cmetcalf@tilera.com>
Tue, 6 Aug 2013 16:55:36 +0000
(12:55 -0400)
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/pci-dma.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/tile/kernel/pci-dma.c
b/arch/tile/kernel/pci-dma.c
index 7e22e73264a9856d094fbcfbf3667e2155a227e7..adc369d8c77bc0266c7443062da446688c6958fc 100644
(file)
--- a/
arch/tile/kernel/pci-dma.c
+++ b/
arch/tile/kernel/pci-dma.c
@@
-36,8
+36,9
@@
static void *tile_dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp,
struct dma_attrs *attrs)
{
- u64 dma_mask = dev->coherent_dma_mask ?: DMA_BIT_MASK(32);
- int node = dev_to_node(dev);
+ u64 dma_mask = (dev && dev->coherent_dma_mask) ?
+ dev->coherent_dma_mask : DMA_BIT_MASK(32);
+ int node = dev ? dev_to_node(dev) : 0;
int order = get_order(size);
struct page *pg;
dma_addr_t addr;