[PATCH 01/17] common/cnxk: perform LF fini ops only when allocated
Tejasree Kondoj
ktejasree at marvell.com
Tue Dec 20 15:32:16 CET 2022
From: Anoob Joseph <anoobj at marvell.com>
If LFs are not attached, LF detach and free ops should not be attempted.
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
drivers/common/cnxk/roc_cpt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index fb97ec89b2..bf216b5545 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -861,6 +861,9 @@ roc_cpt_dev_clear(struct roc_cpt *roc_cpt)
if (cpt == NULL)
return;
+ if (roc_cpt->nb_lf == 0)
+ return;
+
for (i = 0; i < roc_cpt->nb_lf; i++)
cpt->lf_msix_off[i] = 0;
--
2.25.1
More information about the dev
mailing list