summaryrefslogtreecommitdiff
path: root/drivers/common
diff options
context:
space:
mode:
authorShreyansh Jain <shreyansh.jain@nxp.com>2018-10-24 05:44:09 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-10-25 00:51:05 +0200
commitc390b49d74cff8e4efb12b338c9e91421937332f (patch)
tree73692547d2700accc88bbbdb959f7e7aea82608f /drivers/common
parent29ba8d9436fdc284eb4418f95f045a2aea45317a (diff)
downloaddpdk-next-eventdev-c390b49d74cff8e4efb12b338c9e91421937332f.zip
dpdk-next-eventdev-c390b49d74cff8e4efb12b338c9e91421937332f.tar.gz
dpdk-next-eventdev-c390b49d74cff8e4efb12b338c9e91421937332f.tar.xz
common/dpaax: fix nodes check
In case the memory for nodes cannot be allocated, there is no need to check for the length. Also, `node_count` is an unsigned value and cannot be less than 0. Coverity issue: 323521 Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table") Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Diffstat (limited to 'drivers/common')
-rw-r--r--drivers/common/dpaax/dpaax_iova_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 075053b..c38100f 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -172,7 +172,7 @@ dpaax_iova_table_populate(void)
}
nodes = read_memory_node(&node_count);
- if (nodes == NULL || node_count <= 0) {
+ if (nodes == NULL) {
DPAAX_WARN("PA->VA translation not available;");
DPAAX_WARN("Expect performance impact.");
return -1;