From: Md Shofiqul Islam <shofiqtest@gmail.com>
To: dev@dpdk.org
Cc: hemant.agrawal@nxp.com, stable@dpdk.org
Subject: [PATCH v2 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug
Date: Sat, 16 May 2026 14:08:27 +0300 [thread overview]
Message-ID: <20260516110828.35701-2-shofiqtest@gmail.com> (raw)
In-Reply-To: <20260516110828.35701-1-shofiqtest@gmail.com>
fslmc_bus_unplug() called drv->remove() and discarded the return value,
unconditionally clearing driver references and reporting success even
when the remove callback signalled failure. As a result, callers had
no way to detect or react to removal errors.
Capture the return value and propagate it to the caller. Only clear
the driver references and log successful unplug when the callback
returns zero.
Fixes: b5721f271cbf ("bus/fslmc: support DPNI hotplug")
Bugzilla ID: 1914
Cc: hemant.agrawal@nxp.com
Cc: stable@dpdk.org
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
drivers/bus/fslmc/fslmc_bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index cf881b3eec..57bb61dc35 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -620,7 +620,9 @@ fslmc_bus_unplug(struct rte_device *rte_dev)
struct rte_dpaa2_driver *drv = dev->driver;
if (drv && drv->remove) {
- drv->remove(dev);
+ int ret = drv->remove(dev);
+ if (ret != 0)
+ return ret;
dev->driver = NULL;
dev->device.driver = NULL;
DPAA2_BUS_INFO("%s Un-Plugged", dev->device.name);
--
2.51.1
next prev parent reply other threads:[~2026-05-17 12:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-16 11:08 [PATCH v2 0/2] dpaa2: fix error propagation in remove path Md Shofiqul Islam
2026-05-16 11:08 ` Md Shofiqul Islam [this message]
2026-05-16 11:08 ` [PATCH v2 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success Md Shofiqul Islam
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=20260516110828.35701-2-shofiqtest@gmail.com \
--to=shofiqtest@gmail.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@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