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:
Marek Szyprowski 2012-07-06 12:02:04 +02:00
parent 6a6dccba2f
commit cc2caea5b6

View File

@ -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;
}