slim_msm: Satellite channel should not be deallocated more than once
It is possible that satellite channel deallocation is requested more
than once. (e.g. if the satellite times out waiting for response from
previous removal, then it will request removal again during
channel deallocation from its side).
Make sure that does not result in deallocating the channel more than
once.
CRs-fixed: 395926
Change-Id: I002635849bcaa7309de1fbddf1127c456bca6f20
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
(cherry picked from commit ef4448908d31e2ac30336a8a6e5f02e1cce445a0)
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
diff --git a/drivers/slimbus/slim-msm-ctrl.c b/drivers/slimbus/slim-msm-ctrl.c
index 81f74dd..7b188fa 100644
--- a/drivers/slimbus/slim-msm-ctrl.c
+++ b/drivers/slimbus/slim-msm-ctrl.c
@@ -1327,7 +1327,7 @@
ret = slim_reconfigure_now(&sat->satcl);
for (i = 0; i < sat->nsatch; i++) {
struct msm_sat_chan *sch = &sat->satch[i];
- if (sch->req_rem) {
+ if (sch->req_rem && sch->reconf) {
if (!ret) {
slim_dealloc_ch(&sat->satcl,
sch->chanh);