video/rockchip: rga2: Fix rga2_dma_flush_page warnning

"uninitialized symbol 'paddr'."

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ia97afed916b5121a2d0bd20413ed31f1d6702217
This commit is contained in:
Yu Qiaowei
2021-08-04 17:12:58 +08:00
committed by Tao Huang
parent ef484cbba2
commit 8cf5c599ca
2 changed files with 9 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
*
*/
#define pr_fmt(fmt) "rga: " fmt
#define pr_fmt(fmt) "rga2: " fmt
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#define pr_fmt(fmt) "rga2_mmu: " fmt
#include <linux/version.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -65,6 +65,10 @@ dma_addr_t rga2_dma_flush_page(struct page *page, int map)
paddr = dma_map_page(rga2_drvdata->dev, page, 0,
PAGE_SIZE, DMA_BIDIRECTIONAL);
break;
default:
paddr = 0;
pr_err("unknown map cmd 0x%x\n", map);
break;
}
return paddr;
@@ -84,6 +88,9 @@ dma_addr_t rga2_dma_flush_page(struct page *page, int map)
dma_unmap_page(rga2_drvdata->dev, paddr,
PAGE_SIZE, DMA_BIDIRECTIONAL);
break;
default:
pr_err("unknown map cmd 0x%x\n", map);
break;
}
return paddr;