WSL2-Linux-Kernel/drivers/media/usb/pvrusb2
Anirudh Rayabharam f8194e5e63 media: pvrusb2: fix warning in pvr2_i2c_core_done
syzbot has reported the following warning in pvr2_i2c_done:

	sysfs group 'power' not found for kobject '1-0043'

When the device is disconnected (pvr_hdw_disconnect), the i2c adapter is
not unregistered along with the USB and v4l2 teardown. As part of the USB
device disconnect, the sysfs files of the subdevices are also deleted.
So, by the time pvr_i2c_core_done is called by pvr_context_destroy, the
sysfs files have been deleted.

To fix this, unregister the i2c adapter too in pvr_hdw_disconnect. Make
the device deregistration code shared by calling pvr_hdw_disconnect from
pvr2_hdw_destroy.

Reported-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com
Tested-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-19 09:51:39 +02:00
..
Kconfig Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
Makefile
pvrusb2-audio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-audio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-context.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-context.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-cs53l32a.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-cs53l32a.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-ctrl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-ctrl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-cx2584x-v4l.c media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pvrusb2-cx2584x-v4l.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-debugifc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-debugifc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-devattr.c media: pvrusb2: use semicolons rather than commas to separate statements 2020-11-16 10:31:06 +01:00
pvrusb2-devattr.h media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pvrusb2-dvb.c media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pvrusb2-dvb.h media: pvrusb2: Add i2c client demod/tuner support 2019-06-13 14:29:37 -04:00
pvrusb2-eeprom.c media: pvrusb2: use kzalloc instead of kmalloc and memset 2019-08-13 11:48:57 -03:00
pvrusb2-eeprom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-encoder.c media: pvrusb2: Remove unneeded semicolon and add newline 2020-01-08 14:36:32 +01:00
pvrusb2-encoder.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-fx2-cmd.h media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pvrusb2-hdw-internal.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-hdw.c media: pvrusb2: fix warning in pvr2_i2c_core_done 2021-05-19 09:51:39 +02:00
pvrusb2-hdw.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-i2c-core.c media: usb: pvrusb2: convert to use i2c_new_client_device() 2020-04-14 11:32:04 +02:00
pvrusb2-i2c-core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-ioread.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-ioread.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-main.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-std.c media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pvrusb2-std.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-sysfs.c media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pvrusb2-sysfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-util.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-v4l2.c media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
pvrusb2-v4l2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-video-v4l.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-video-v4l.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-wm8775.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2-wm8775.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
pvrusb2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00