]> git.baikalelectronics.ru Git - kernel.git/commit
media: pvrusb2: Fix oops on tear-down when radio support is not present
authorMike Isely <isely@pobox.com>
Wed, 6 Nov 2019 11:11:14 +0000 (12:11 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 9 Nov 2019 08:10:06 +0000 (09:10 +0100)
commitedea83380a69f53c1bc0fd295b3d84f851db238e
tree306c88f351e7698c23ddeab4ca8bc150de02cb21
parent58b057a56dba803fe6e6fd666c243474b8ad541f
media: pvrusb2: Fix oops on tear-down when radio support is not present

In some device configurations there's no radio or radio support in the
driver.  That's OK, as the driver sets itself up accordingly.  However
on tear-down in these caes it's still trying to tear down radio
related context when there isn't anything there, leading to
dereferences through a null pointer and chaos follows.

How this bug survived unfixed for 11 years in the pvrusb2 driver is a
mystery to me.

[hverkuil: fix two checkpatch warnings]

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c