alistair23-linux/drivers/media
Philipp Zabel f9ffcb0a21 media: uvcvideo: Fix driver reference counting
kref_init initializes the reference count to 1, not 0. This additional
reference is never released since the conversion to reference counters.
As a result, uvc_delete is not called anymore when UVC cameras are
disconnected.
Fix this by adding an additional kref_put in uvc_disconnect and in the
probe error path. This also allows to remove the temporary additional
reference in uvc_unregister_video.

Fixes: 9d15cd958c ("media: uvcvideo: Convert from using an atomic variable to a reference count")

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-28 16:49:47 -04:00
..
cec media: cec: fix wrong tx/rx_status values when canceling a msg 2018-05-28 16:25:25 -04:00
common media: Remove depends on HAS_DMA in case of platform dependency 2018-05-28 16:17:08 -04:00
dvb-core media: dvb_ca_en50221: prevent using slot_info for Spectre attacs 2018-05-16 10:17:22 -04:00
dvb-frontends media: au8522: remove duplicate code 2018-05-28 16:26:38 -04:00
firewire vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
i2c media: adv7511: fix incorrect clear of CEC receive interrupt 2018-05-28 16:25:45 -04:00
mmc media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
pci media: tw686x: Fix incorrect vb2_mem_ops GFP flags 2018-05-28 16:21:41 -04:00
platform media: pxa_camera: avoid duplicate s_power calls 2018-05-28 16:24:30 -04:00
radio Linux 4.17-rc4 2018-05-10 07:19:23 -04:00
rc media: rc: ite-cir: lower timeout and extend allowed timeout range 2018-05-14 07:17:28 -04:00
spi media: cxd2880-spi: Modified how to declare structure 2018-05-05 10:37:12 -04:00
tuners Linux 4.17-rc4 2018-05-10 07:19:23 -04:00
usb media: uvcvideo: Fix driver reference counting 2018-05-28 16:49:47 -04:00
v4l2-core media: v4l2-core: push taking ioctl mutex down to ioctl handler 2018-05-28 16:31:44 -04:00
Kconfig media: cec: Kconfig coding style issue 2018-05-09 16:26:50 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
media-device.c media: media-device: fix ioctl function types 2018-05-09 16:33:46 -04:00
media-devnode.c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
media-entity.c media: media.h: reorganize header to make it easier to understand 2018-02-26 10:14:46 -05:00