Commit cc2caea5 authored by Marek Szyprowski's avatar Marek Szyprowski

mm: cma: fix condition check when setting global cma area

dev_set_cma_area incorrectly assigned cma to global area on first call
due to incorrect check. This patch fixes this issue.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
parent 6a6dccba
...@@ -18,7 +18,7 @@ static inline void dev_set_cma_area(struct device *dev, struct cma *cma) ...@@ -18,7 +18,7 @@ static inline void dev_set_cma_area(struct device *dev, struct cma *cma)
{ {
if (dev) if (dev)
dev->cma_area = cma; dev->cma_area = cma;
if (!dev || !dma_contiguous_default_area) if (!dev && !dma_contiguous_default_area)
dma_contiguous_default_area = cma; dma_contiguous_default_area = cma;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment