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>
Fri, 16 Feb 2018 19:22:45 +0000 (20:22 +0100)
commitdd24d173b50af3aadb1ea2e04edaa8d68ca59b23
tree7900888871702b1f8010bda0b793c72d703822d6
parent2bd6279a4a8cd6c8d108b694c5ddb9cb53f6e35c
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>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/hdpvr/hdpvr-core.c