]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: hdpvr: Fix an error handling path in hdpvr_probe()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 22 Sep 2017 13:07:06 +0000 (09:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 15:07:23 +0000 (16:07 +0100)
commit4f1600b92f97828b114c31c64e41665276e310cd
treefd1386b38e7c02df10a6b9266a17fe5cfeccbc54
parente9ffc17c9494cad6686376a4587ee638badcd3f1
media: hdpvr: Fix an error handling path in hdpvr_probe()

commit c0f71bbb810237a38734607ca4599632f7f5d47f upstream.

Here, hdpvr_register_videodev() is responsible for setup and
register a video device. Also defining and initializing a worker.
hdpvr_register_videodev() is calling by hdpvr_probe at last.
So no need to flush any work here.
Unregister v4l2, free buffers and memory. If hdpvr_probe() will fail.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
[krzk: backport to v4.4, still using single thread workqueue which
       is drained/destroyed now in proper step so it cannot be NULL]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/hdpvr/hdpvr-core.c