Skip to content
Snippets Groups Projects
Commit 426467be authored by Felix Fietkau's avatar Felix Fietkau
Browse files

kernel: add missing null pointer check for mips dma ops inline patch on 3.18


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

SVN-Revision: 43511
parent 6ad51092
No related branches found
No related tags found
No related merge requests found
...@@ -423,6 +423,15 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org> ...@@ -423,6 +423,15 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
} }
static inline int 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 @@ -74,7 +411,11 @@ static inline void *dma_alloc_attrs(stru
void *ret; void *ret;
struct dma_map_ops *ops = get_dma_ops(dev); struct dma_map_ops *ops = get_dma_ops(dev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment