All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: cma: fix condition check when setting global cma area
@ 2012-07-06 10:08 Marek Szyprowski
  0 siblings, 0 replies; only message in thread
From: Marek Szyprowski @ 2012-07-06 10:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Michal Nazarewicz, Marek Szyprowski, Kyungmin Park, Arnd Bergmann

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>
---
 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.1.569.g6f426


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-06 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-06 10:08 [PATCH] mm: cma: fix condition check when setting global cma area Marek Szyprowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.