DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Md Shofiqul Islam <shofiqtest@gmail.com>
To: dev@dpdk.org
Cc: hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com,
	g.singh@nxp.com, stable@dpdk.org
Subject: [PATCH 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success
Date: Wed, 13 May 2026 23:37:25 +0300	[thread overview]
Message-ID: <20260513203725.1905-3-shofiqtest@gmail.com> (raw)
In-Reply-To: <20260513203725.1905-1-shofiqtest@gmail.com>

dpaa2_qdma_remove() checked the return value of rte_dma_pmd_release()
and logged an error on failure, but then unconditionally returned 0,
hiding the failure from fslmc_bus_unplug() and any higher-level
caller.  A device-cleanup failure was silently swallowed.

Return the actual error code so that callers can detect and handle
removal failures correctly.

Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
Bugzilla ID: 1914
Cc: hemant.agrawal@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
 drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index beca464c72..f7d94bb799 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -1739,7 +1739,7 @@ dpaa2_qdma_remove(struct rte_dpaa2_device *dpaa2_dev)
 	if (ret)
 		DPAA2_QDMA_ERR("Device cleanup failed");
 
-	return 0;
+	return ret;
 }
 
 static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd;
-- 
2.54.0.windows.1


      parent reply	other threads:[~2026-05-16  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 20:37 [PATCH 0/2] bus/fslmc, dma/dpaa2: fix remove callback error propagation Md Shofiqul Islam
2026-05-13 20:37 ` [PATCH 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug Md Shofiqul Islam
2026-05-13 20:37 ` Md Shofiqul Islam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260513203725.1905-3-shofiqtest@gmail.com \
    --to=shofiqtest@gmail.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox