From: tze.yee.ng@altera.com
To: Dinh Nguyen <dinguyen@kernel.org>, linux-kernel@vger.kernel.org
Cc: Tze Yee Ng <tze.yee.ng@altera.com>,
Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>,
Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
Subject: [PATCH 3/3] Fixes: 15847537b623 ("firmware: stratix10-rsu: Migrate RSU driver to use stratix10 asynchronous framework.")
Date: Thu, 14 May 2026 00:32:18 -0700 [thread overview]
Message-ID: <540176c3e715fd573f2d3d404f45ece202e3734d.1778742913.git.tze.yee.ng@altera.com> (raw)
In-Reply-To: <cover.1778742913.git.tze.yee.ng@altera.com>
From: Tze Yee Ng <tze.yee.ng@altera.com>
After stratix10_svc_add_async_client() succeeds, probe error paths and
remove() must call stratix10_svc_remove_async_client() before
stratix10_svc_free_channel(). Otherwise async state is left allocated
while the channel is released.
Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com>
---
drivers/firmware/stratix10-rsu.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c
index 6c5f952f48d8..a0f679f73460 100644
--- a/drivers/firmware/stratix10-rsu.c
+++ b/drivers/firmware/stratix10-rsu.c
@@ -958,21 +958,27 @@ static int stratix10_rsu_probe(struct platform_device *pdev)
0, rsu_dcmf_version_callback);
if (ret) {
dev_err(dev, "Error, getting DCMF version %i\n", ret);
+ stratix10_svc_remove_async_client(priv->chan);
stratix10_svc_free_channel(priv->chan);
+ return ret;
}
ret = rsu_send_msg(priv, COMMAND_RSU_DCMF_STATUS,
0, rsu_dcmf_status_callback);
if (ret) {
dev_err(dev, "Error, getting DCMF status %i\n", ret);
+ stratix10_svc_remove_async_client(priv->chan);
stratix10_svc_free_channel(priv->chan);
+ return ret;
}
ret = rsu_send_msg(priv, COMMAND_RSU_MAX_RETRY, 0,
rsu_max_retry_callback);
if (ret) {
dev_err(dev, "Error, getting RSU max retry %i\n", ret);
+ stratix10_svc_remove_async_client(priv->chan);
stratix10_svc_free_channel(priv->chan);
+ return ret;
}
/* get QSPI device info from firmware */
@@ -989,16 +995,19 @@ static int stratix10_rsu_probe(struct platform_device *pdev)
rsu_async_get_spt_table_callback);
if (ret) {
dev_err(dev, "Error, getting SPT table %i\n", ret);
+ stratix10_svc_remove_async_client(priv->chan);
stratix10_svc_free_channel(priv->chan);
+ return ret;
}
- return ret;
+ return 0;
}
static void stratix10_rsu_remove(struct platform_device *pdev)
{
struct stratix10_rsu_priv *priv = platform_get_drvdata(pdev);
+ stratix10_svc_remove_async_client(priv->chan);
stratix10_svc_free_channel(priv->chan);
}
--
2.43.7
next prev parent reply other threads:[~2026-05-14 7:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 7:32 [PATCH 0/3] firmware: stratix10-rsu: expose QSPI flash size and erase size from firmware tze.yee.ng
2026-05-14 7:32 ` [PATCH 1/3] Documentation: ABI: add stratix10-rsu QSPI size and erase_size sysfs tze.yee.ng
2026-05-14 7:32 ` [PATCH 2/3] firmware: stratix10-rsu: Add flash device info retrieval via SMC tze.yee.ng
2026-05-14 7:32 ` tze.yee.ng [this message]
2026-05-14 17:18 ` [PATCH 3/3] Fixes: 15847537b623 ("firmware: stratix10-rsu: Migrate RSU driver to use stratix10 asynchronous framework.") Dinh Nguyen
2026-05-15 2:14 ` NG, TZE YEE
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=540176c3e715fd573f2d3d404f45ece202e3734d.1778742913.git.tze.yee.ng@altera.com \
--to=tze.yee.ng@altera.com \
--cc=adrian.ho.yin.ng@altera.com \
--cc=dinguyen@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muhammad.nazim.amirul.nazle.asmade@altera.com \
/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
all inboxes | Powered by JetHome®