blob: a2b787cebf4d90fd226c03585284c2d7f70af186 [file] [log] [blame]
From dhobsong@igel.co.jp Mon Oct 29 00:53:18 2012
From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Date: Mon, 29 Oct 2012 16:50:53 +0900
Subject: [PATCH v2 36/58] mm: cma: fix condition check when setting global cma area
To: greg@kroah.com, laurent.pinchart@ideasonboard.com, horms@verge.net.au
Cc: ltsi-dev@lists.linuxfoundation.org, dhobsong@igel.co.jp
Message-ID: <1351497075-32717-37-git-send-email-dhobsong@igel.co.jp>
From: Marek Szyprowski <m.szyprowski@samsung.com>
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>
(cherry picked from commit cc2caea5b6152b8ce66dc2bbe83dc72b60612da8)
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
include/asm-generic/dma-contiguous.h | 2 +-
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;
}
--
1.7.5.4