Skip to content

Commit

Permalink
common/dpaax: fix possible null pointer access
Browse files Browse the repository at this point in the history
[ upstream commit 611c394 ]

This patch fixes possible null pointer access when dump iova table.

Fixes: 2f3d633 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  • Loading branch information
fengchengwen authored and steevenlee committed May 8, 2021
1 parent 1bcde22 commit 79273b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/common/dpaax/dpaax_iova_table.c
Expand Up @@ -366,8 +366,10 @@ dpaax_iova_table_dump(void)
}

DPAAX_DEBUG(" === Start of PA->VA Translation Table ===");
if (dpaax_iova_table_p == NULL)
if (dpaax_iova_table_p == NULL) {
DPAAX_DEBUG("\tNULL");
return;
}

entry = dpaax_iova_table_p->entries;
for (i = 0; i < dpaax_iova_table_p->count; i++) {
Expand Down

0 comments on commit 79273b1

Please sign in to comment.