DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
@ 2023-06-20  8:51 Thierry Herbelot
  2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thierry Herbelot @ 2023-06-20  8:51 UTC (permalink / raw)
  To: dev
  Cc: Thierry Herbelot, Thomas Monjalon, Nithin Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

Unlock mbox when an error is detected.

Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC APIs')
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 drivers/common/cnxk/roc_npa.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 377439c2baaf..38e149da82cc 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -245,8 +245,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
 	if (rc < 0)
 		goto exit;
 
-	if (aura_rsp->hdr.rc != 0)
-		return NPA_ERR_AURA_POOL_FINI;
+	if (aura_rsp->hdr.rc != 0) {
+		rc = NPA_ERR_AURA_POOL_FINI;
+		goto exit;
+	}
 
 	/* Sync NDC-NPA for LF */
 	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
-- 
2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-21  5:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20  8:51 [PATCH] common/cnxk/roc_npa: fix npa_aura_fini Thierry Herbelot
2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
2023-06-20  9:29   ` Thierry Herbelot
2023-06-20  9:32 ` David Marchand
2023-06-20  9:49   ` Thierry Herbelot
2023-06-20  9:39 ` [PATCH v2] common/cnxk/roc_npa: unlock mbox in error cases Thierry Herbelot
2023-06-20  9:43   ` [PATCH v3] " Thierry Herbelot
2023-06-21  4:46     ` [EXT] " Ashwin Sekhar T K
2023-06-21  5:00       ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).