summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2012-07-06 12:02:04 +0200
committerMarek Szyprowski <m.szyprowski@samsung.com>2012-07-06 12:02:04 +0200
commitcc2caea5b6152b8ce66dc2bbe83dc72b60612da8 (patch)
treec39d09978bd8f2f7f29771b80b4064e2aabd5d2d
parent6a6dccba2fdc2a69f1f36b8f1c0acc8598e7221b (diff)
downloadop-kernel-dev-cc2caea5b6152b8ce66dc2bbe83dc72b60612da8.zip
op-kernel-dev-cc2caea5b6152b8ce66dc2bbe83dc72b60612da8.tar.gz
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>
-rw-r--r--include/asm-generic/dma-contiguous.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/dma-contiguous.h b/include/asm-generic/dma-contiguous.h
index c544356..294b1e7 100644
--- a/include/asm-generic/dma-contiguous.h
+++ b/include/asm-generic/dma-contiguous.h
@@ -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;
}
OpenPOWER on IntegriCloud