Skip to content

Commit

Permalink
mm: cma: fix condition check when setting global cma area
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Szyprowski committed Jul 6, 2012
1 parent 6a6dccb commit cc2caea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-generic/dma-contiguous.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cc2caea

Please sign in to comment.