ARM: dma-mapping: fix build warning in __dma_alloc()
authorJingoo Han <jg1.han@samsung.com>
Wed, 24 Oct 2012 05:09:14 +0000 (14:09 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 24 Oct 2012 05:38:15 +0000 (07:38 +0200)
Fix build warning in __dma_alloc() as below:

arch/arm/mm/dma-mapping.c: In function '__dma_alloc':
arch/arm/mm/dma-mapping.c:653:29: warning: 'page' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
arch/arm/mm/dma-mapping.c

index 477a2d2..58bc3e4 100644 (file)
@@ -610,7 +610,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
                         gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller)
 {
        u64 mask = get_coherent_dma_mask(dev);
-       struct page *page;
+       struct page *page = NULL;
        void *addr;
 
 #ifdef CONFIG_DMA_API_DEBUG