aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/cec
diff options
context:
space:
mode:
authorHans Verkuil2020-09-08 12:26:10 +0200
committerMauro Carvalho Chehab2020-09-26 10:24:47 +0200
commit5254187cfaf22facc42415ad45c16db53ffd0c87 (patch)
tree722629afe432791981450bffc8e7691faea39974 /drivers/media/cec
parent0893e4b2998a5d8d0c281909508fd4e6d1273d6c (diff)
media: cec-core.c: stop kthread_config before kthread
The kthread_config relies on the main kthread (message processing loop) to be present, so stop kthread_config before kthread. It's unlikely to be a problem (and I've never seen any issues), but if nothing else it makes sense to stop the threads in this order. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/cec')
-rw-r--r--drivers/media/cec/core/cec-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/cec/core/cec-core.c b/drivers/media/cec/core/cec-core.c
index 3ee16f672d68..ece236291f35 100644
--- a/drivers/media/cec/core/cec-core.c
+++ b/drivers/media/cec/core/cec-core.c
@@ -396,9 +396,9 @@ void cec_delete_adapter(struct cec_adapter *adap)
{
if (IS_ERR_OR_NULL(adap))
return;
- kthread_stop(adap->kthread);
if (adap->kthread_config)
kthread_stop(adap->kthread_config);
+ kthread_stop(adap->kthread);
if (adap->ops->adap_free)
adap->ops->adap_free(adap);
#ifdef CONFIG_MEDIA_CEC_RC