linux/drivers/media/usb
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
..
airspy media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: au0828: Consolidate dmesg output 2020-11-16 10:31:10 +01:00
b2c2 media: flexcop: avoid -Wempty-body warning 2021-04-09 13:05:01 +02:00
cpia2 media: cpia2: fix memory leak in cpia2_usb_probe 2021-05-19 09:51:39 +02:00
cx231xx media: cx231xx/cx231xx.h: Remove repeated struct declaration 2021-04-06 16:10:19 +02:00
dvb-usb Fix misc new gcc warnings 2021-04-27 17:05:53 -07:00
dvb-usb-v2 media: media/usb: fix kernel-doc header issues 2021-03-22 12:51:50 +01:00
em28xx media: em28xx/em28xx.h: Remove duplicate struct declaration 2021-04-06 16:11:54 +02:00
go7007 media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
gspca media: gscpa/stv06xx: fix memory leak 2021-04-09 13:19:38 +02:00
hackrf media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
hdpvr media: usb: hdpvr: convert to use i2c_new_client_device() 2020-04-14 11:31:48 +02:00
msi2500 media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
pvrusb2 media: pvrusb2: fix warning in pvr2_i2c_core_done 2021-05-19 09:51:39 +02:00
pwc treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
s2255 media: s2255drv: remove redundant assignment to variable field 2021-05-19 09:51:39 +02:00
siano media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
stk1160 media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
stkwebcam media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
tm6000 module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttusb-budget media: dvb-ttusb-budget: cleanup printk logic 2020-09-03 11:15:47 +02:00
ttusb-dec media: media/usb:Remove superfluous "breaks" in the ttusb_dec.c 2021-03-11 11:59:43 +01:00
usbtv media updates for v5.13-rc1 2021-04-28 09:24:36 -07:00
uvc dma-mapping updates for Linux 5.13: 2021-05-04 10:52:09 -07:00
zr364xx media: drivers/media/usb: fix memory leak in zr364xx_probe 2021-03-11 11:59:44 +01:00
Kconfig media: move CEC USB drivers to a separate directory 2020-04-15 12:06:40 +02:00
Makefile media: move CEC USB drivers to a separate directory 2020-04-15 12:06:40 +02:00