]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: cec-core.c: stop kthread_config before kthread
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 8 Sep 2020 10:26:10 +0000 (12:26 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:24:47 +0000 (10:24 +0200)
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>
drivers/media/cec/core/cec-core.c

index 3ee16f672d68c20b1b31c2cb00e305e37f479723..ece236291f3586236ba1e36ed8af81a1b2057564 100644 (file)
@@ -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