lkml.org 
[lkml]   [2022]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rpmsg: qcom_smd: Fix redundant channel->assigned assignment
Date
In qcom_channel_state_worker(), we are setting channel->registered
to true when registering a channel, but this is getting repeated both
before and after re-locking the channels_lock spinlock, which is
obviously a typo.
Remove the assignment done out of the spinlock to fix this redundancy.

Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/rpmsg/qcom_smd.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 540e027f08c4..0ee3f7ddabb0 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1298,9 +1298,7 @@ static void qcom_channel_state_worker(struct work_struct *work)

spin_unlock_irqrestore(&edge->channels_lock, flags);
qcom_smd_create_device(channel);
- channel->registered = true;
spin_lock_irqsave(&edge->channels_lock, flags);
-
channel->registered = true;
}

--
2.33.1
\
 
 \ /
  Last update: 2022-01-14 13:00    [W:0.026 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site