git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bde0d30
)
common/cnxk: handle ROC model init failure
author
Hanumanth Pothula
<hpothula@marvell.com>
Fri, 10 Jun 2022 08:14:14 +0000
(13:44 +0530)
committer
Jerin Jacob
<jerinj@marvell.com>
Wed, 15 Jun 2022 17:55:42 +0000
(19:55 +0200)
Return with error on fail to initialize ROC model.
Fixes:
014a9e222bac
("common/cnxk: add model init and IO handling API")
Cc: stable@dpdk.org
Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
drivers/common/cnxk/roc_platform.c
patch
|
blob
|
history
diff --git
a/drivers/common/cnxk/roc_platform.c
b/drivers/common/cnxk/roc_platform.c
index
ebb6225
..
ce0f9b8
100644
(file)
--- a/
drivers/common/cnxk/roc_platform.c
+++ b/
drivers/common/cnxk/roc_platform.c
@@
-37,7
+37,11
@@
roc_plt_init(void)
plt_err("Failed to reserve mem for roc_model");
return -ENOMEM;
}
- roc_model_init(mz->addr);
+ if (roc_model_init(mz->addr)) {
+ plt_err("Failed to init roc_model");
+ rte_memzone_free(mz);
+ return -EINVAL;
+ }
}
} else {
if (mz == NULL) {