mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
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: Marek Szyprowski <m.szyprowski@samsung.com>
This commit is contained in:
parent
6a6dccba2f
commit
cc2caea5b6
@ -18,7 +18,7 @@ static inline void dev_set_cma_area(struct device *dev, struct cma *cma)
|
||||
{
|
||||
if (dev)
|
||||
dev->cma_area = cma;
|
||||
if (!dev || !dma_contiguous_default_area)
|
||||
if (!dev && !dma_contiguous_default_area)
|
||||
dma_contiguous_default_area = cma;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user