ARM: dma-mapping: fix error path for memory allocation failure
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 27 Jul 2012 15:12:50 +0000 (17:12 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 26 Feb 2013 17:51:26 +0000 (19:51 +0200)
commit7b2252182afb19d26b86328b5574c08ef82ae782
treea62a0f7f715b08f9c33d28bf3d98f9cc9e7a7b79
parentc9b3011776e5a0ef11591ff65ee37647f3f55230
ARM: dma-mapping: fix error path for memory allocation failure

This patch fixes incorrect check in error path. When the allocation of
first page fails, the kernel ops appears due to accessing -1 element of
the pages array.

Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
arch/arm/mm/dma-mapping.c