2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 15:13:55 +08:00
linux-next/drivers/media
Alexey Khoroshilov cf732b5fa3 [media] dvb-usb: fix error handling in ttusb_dec_probe()
There is an asymmetry in ttusb_dec_init_usb()-ttusb_init_rc()
and ttusb_dec_exit_usb()-ttusb_dec_exit_rc() in terms of resources
allocated-deallocated. irq_urb and irq_buffer are allocated in
ttusb_dec_init_usb(), while they are deallocated in ttusb_dec_exit_rc().
As a result there is a leak of them in ttusb_dec_probe().
The patch fixes the asymmetry and a leak on a failure path in ttusb_dec_init_usb().
By the way, it
- removes usage of -1 as a custom error code,
- replaces GFP_ATOMIC by GFP_KERNEL in usb_alloc_coherent() in ttusb_dec_init_usb()
  as soon as all other memory allocation done with GFP_KERNEL;
- refactors ttusb_dec_boot_dsp() in an equivalent way except for returning 0
  instead of 1 if ttusb_dec_boot_dsp() succeed in (!mode) branch.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-03 07:33:59 -03:00
..
common [media] sms: fix randconfig building error 2013-08-24 06:57:20 -03:00
dvb-core [media] media: dvb-core: prepare for enabling irq in complete() 2013-10-02 06:48:13 -03:00
dvb-frontends [media] ts2020: keep 1.06 MHz as default value for frequency_div 2013-10-02 06:48:15 -03:00
firewire firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
i2c [media] ml86v7667: fix compile warning: 'ret' set but not used 2013-09-03 09:24:17 -03:00
mmc [media] siano: get rid of CammelCase from smscoreapi.h 2013-03-21 10:03:16 -03:00
parport [media] bw-qcam: fix timestamp handling 2013-05-27 09:30:19 -03:00
pci [media] cx88: Fix regression: CX88_AUDIO_WM8775 can't be 0 2013-09-03 09:24:22 -03:00
platform [media] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table 2013-09-26 07:33:59 -03:00
radio Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
rc [media] media: rc: rdev->open or rdev->close can be NULL 2013-08-23 05:41:23 -03:00
tuners [media] fc001[23]: Change variable type to bool 2013-10-02 06:48:14 -03:00
usb [media] dvb-usb: fix error handling in ttusb_dec_probe() 2013-10-03 07:33:59 -03:00
v4l2-core [media] videobuf2: Add debug print for the output buffer plane lengths checks 2013-09-26 07:34:41 -03:00
Kconfig [media] Fix build when drivers are builtin and frontend modules 2013-06-20 10:35:53 -03:00
Makefile [media] move i2c files into drivers/media/i2c 2012-09-06 18:42:54 -03:00
media-device.c [media] media: info leak in __media_device_enum_links() 2013-06-12 18:52:45 -03:00
media-devnode.c [media] media: Add 64--32 bit compat ioctl handler 2013-03-18 20:44:36 -03:00
media-entity.c [media] media: Add support for circular graph traversal 2013-08-18 07:16:48 -03:00