summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/arm_scmi
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2020-04-20 16:23:13 +0100
committerSudeep Holla <sudeep.holla@arm.com>2020-04-20 17:25:26 +0100
commitb37f5cc8d243479d7572445010fb6c9a4dff6dc4 (patch)
tree9e864d33edbb5cd7e8cc591ebcdf599f81fc028b /drivers/firmware/arm_scmi
parent87dff4e63cf2910f2e4a32d1cb3e4a1a25406eb7 (diff)
downloadlinux-b37f5cc8d243479d7572445010fb6c9a4dff6dc4.tar.gz
linux-b37f5cc8d243479d7572445010fb6c9a4dff6dc4.tar.bz2
linux-b37f5cc8d243479d7572445010fb6c9a4dff6dc4.zip
firmware: arm_scmi: Clear channel on reception of unexpected responses
When an unexpected response message is received we currently warn the user and bail-out, ensure to also free the channel by invoking the transport independent operation .clear_channel() Link: https://lore.kernel.org/r/20200420152315.21008-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi')
-rw-r--r--drivers/firmware/arm_scmi/driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 90c7a0bb62ef..31c6a89a6edd 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -242,6 +242,7 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
/* Are we even expecting this? */
if (!test_bit(xfer_id, minfo->xfer_alloc_table)) {
dev_err(dev, "message for %d is not expected!\n", xfer_id);
+ info->desc->ops->clear_channel(cinfo);
return;
}