diff options
| author | Sudeep Holla <sudeep.holla@kernel.org> | 2026-07-14 13:56:33 +0100 |
|---|---|---|
| committer | Sudeep Holla <sudeep.holla@kernel.org> | 2026-07-14 21:19:22 +0100 |
| commit | f3e3773c4e5e96549d7540d8ddeb4fcd534f6f1d (patch) | |
| tree | a7bfafc9fde6fca6011d1d017fd1426bdb11d4b9 | |
| parent | 6f7c06744d53dc8e047725d411d7f915d9ec35ae (diff) | |
| download | linux-f3e3773c4e5e96549d7540d8ddeb4fcd534f6f1d.tar.gz linux-f3e3773c4e5e96549d7540d8ddeb4fcd534f6f1d.zip | |
firmware: arm_scmi: Unwind P2A receiver mailbox setup failure
mailbox_chan_setup() can request an additional P2A receiver channel after
successfully acquiring the primary P2A channel. If that later request
fails, the function returns immediately and leaves the primary channel
allocated.
Unwind the primary mailbox channel before returning the error so probe
deferral or other setup failures do not leave the channel busy for later
probe attempts.
Fixes: fa8b28ba22d9 ("firmware: arm_scmi: Add support for platform to agent channel completion")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://patch.msgid.link/20260714-scmi_core_fixes-v6-14-3afe499d46e3@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
| -rw-r--r-- | drivers/firmware/arm_scmi/transports/mailbox.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/arm_scmi/transports/mailbox.c b/drivers/firmware/arm_scmi/transports/mailbox.c index 37e3eab529ea..308736c3ead9 100644 --- a/drivers/firmware/arm_scmi/transports/mailbox.c +++ b/drivers/firmware/arm_scmi/transports/mailbox.c @@ -241,9 +241,10 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, smbox->chan_platform_receiver = mbox_request_channel(cl, p2a_rx_chan); if (IS_ERR(smbox->chan_platform_receiver)) { ret = PTR_ERR(smbox->chan_platform_receiver); + smbox->chan_platform_receiver = NULL; if (ret != -EPROBE_DEFER) dev_err(cdev, "failed to request SCMI P2A Receiver mailbox\n"); - return ret; + goto err_free_chan; } } |
