mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
coresight-tmc-etr: Check if page is valid before dma_map_page
Check if page is valid before dma_map_page to avoid the exception. Change-Id: Ia92c7c86c437615f2a314511049bd4ffb655a41c Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
This commit is contained in:
parent
12007b0e9b
commit
902bc613cd
1 changed files with 2 additions and 0 deletions
|
|
@ -214,6 +214,8 @@ static int tmc_pages_alloc(struct tmc_pages *tmc_pages,
|
|||
page = alloc_pages_node(node,
|
||||
GFP_KERNEL | __GFP_ZERO, 0);
|
||||
}
|
||||
if (!page)
|
||||
goto err;
|
||||
paddr = dma_map_page(real_dev, page, 0, PAGE_SIZE, dir);
|
||||
if (dma_mapping_error(real_dev, paddr))
|
||||
goto err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue