linux/drivers/media
Laurent Pinchart 317efce991 [media] v4l: Reset subdev v4l2_dev field to NULL if registration fails
When subdev registration fails the subdev v4l2_dev field is left to a
non-NULL value. Later calls to v4l2_device_unregister_subdev() will
consider the subdev as registered and will module_put() the subdev
module without any matching module_get().
Fix this by setting the subdev v4l2_dev field to NULL in
v4l2_device_register_subdev() when the function fails.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:25:22 -02:00
..
common [media] media: saa7146: don't use mutex_lock_interruptible() in device_release() 2012-12-27 17:34:28 -02:00
dvb-core [media] it913x: add support for Avermedia A835B 2012-12-27 19:13:30 -02:00
dvb-frontends [media] m88rs2000: make use ts2020 2012-12-28 21:37:36 -02:00
firewire [media] remove include/linux/dvb/dmx.h 2012-10-19 07:29:17 -03:00
i2c [media] tvp5150: remove compat control ops 2013-01-05 00:55:53 -02:00
mmc [media] siano: fix RC compilation 2012-11-07 11:09:08 +01:00
parport [media] Add missing help for some menuconfig items 2012-08-21 08:17:37 -03:00
pci [media] m88rs2000: make use ts2020 2012-12-28 21:37:36 -02:00
platform [media] vivi: Constify structures 2012-12-28 13:32:51 -02:00
radio [media] media: add driver for Masterkit MA901 usb radio 2012-12-28 12:20:33 -02:00
rc [media] media/rc: fix oops on unloading module rc-core 2012-12-27 17:45:40 -02:00
tuners [media] tuners/tda18271: Replace memcpy with struct assignment 2012-12-27 19:01:13 -02:00
usb [media] em28xx: consider the message length limitation of the i2c adapter when reading the eeprom 2013-01-05 01:19:11 -02:00
v4l2-core [media] v4l: Reset subdev v4l2_dev field to NULL if registration fails 2013-01-05 01:25:22 -02:00
Kconfig [media] Improve media Kconfig menu 2012-12-27 18:40:09 -02:00
Makefile [media] move i2c files into drivers/media/i2c 2012-09-06 18:42:54 -03:00
media-device.c [media] media: fix MEDIA_IOC_DEVICE_INFO return code 2012-08-12 07:57:57 -03:00
media-devnode.c [media] media-devnode: Replace printk with pr_* 2012-09-27 14:19:23 -03:00
media-entity.c [media] media: Add link_validate() op to check links to the sink pad 2012-05-14 08:44:11 -03:00