aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-03 18:17:17 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-12-03 18:17:17 +0000
commit644cc284effeeb52251c78a8c3c1f4eacdea66ed (patch)
tree6447a09c4a75d7cdaf891b6e47e2eb34e5e1d8b4 /target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch
parent3eb3771e2c3c0c9fdace83e8372356bf80f445a7 (diff)
downloadmaster-187ad058-644cc284effeeb52251c78a8c3c1f4eacdea66ed.tar.gz
master-187ad058-644cc284effeeb52251c78a8c3c1f4eacdea66ed.tar.bz2
master-187ad058-644cc284effeeb52251c78a8c3c1f4eacdea66ed.zip
kernel: add missing null pointer check for mips dma ops inline patch on 3.18
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43511 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch')
-rw-r--r--target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch b/target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch
index 7425ba0305..49d44574b9 100644
--- a/target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch
+++ b/target/linux/generic/patches-3.18/132-mips_inline_dma_ops.patch
@@ -423,6 +423,15 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
}
static inline int
+@@ -54,7 +391,7 @@ dma_set_mask(struct device *dev, u64 mas
+ if(!dev->dma_mask || !dma_supported(dev, mask))
+ return -EIO;
+
+- if (ops->set_dma_mask)
++ if (ops && ops->set_dma_mask)
+ return ops->set_dma_mask(dev, mask);
+
+ *dev->dma_mask = mask;
@@ -74,7 +411,11 @@ static inline void *dma_alloc_attrs(stru
void *ret;
struct dma_map_ops *ops = get_dma_ops(dev);