linux/drivers/media/pci
Lukas Wunner e297ddf296
media: netup_unidvb: Don't leak SPI master in probe error path
If the call to spi_register_master() fails on probe of the NetUP
Universal DVB driver, the spi_master struct is erroneously not freed.

Likewise, if spi_new_device() fails, the spi_controller struct is
not unregistered.  Plug the leaks.

While at it, fix an ordering issue in netup_spi_release() wherein
spi_unregister_master() is called after fiddling with the IRQ control
register.  The correct order is to call spi_unregister_master() *before*
this teardown step because bus accesses may still be ongoing until that
function returns.

Fixes: 52b1eaf4c5 ("[media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: <stable@vger.kernel.org> # v4.3+: 5e844cc37a: spi: Introduce device-managed SPI controller allocation
Cc: <stable@vger.kernel.org> # v4.3+
Cc: Kozlov Sergey <serjk@netup.ru>
Link: https://lore.kernel.org/r/c4c24f333fc7840f4a3db24789e6e10dd660bede.1607286887.git.lukas@wunner.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-07 14:18:57 +00:00
..
b2c2
bt8xx media: media/pci: prevent memory leak in bttv_probe 2020-09-26 10:55:55 +02:00
cobalt media: pci: cobalt-i2c.c: fix comparison of 0/1 to bool variable 2020-08-29 08:04:01 +02:00
cx18 media: cx18: Replace http links with https ones 2020-07-19 14:00:32 +02:00
cx88 media: pci: fix common ALSA DMA-mapping related codes 2020-09-26 10:34:44 +02:00
cx23885 media: pci: fix common ALSA DMA-mapping related codes 2020-09-26 10:34:44 +02:00
cx25821 media: pci: fix common ALSA DMA-mapping related codes 2020-09-26 10:34:44 +02:00
ddbridge treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dm1105 media: delete unused proc_fs.h include 2019-10-07 07:31:36 -03:00
dt3155 media: media/pci: use vb2_video_unregister_device() 2020-08-28 15:01:54 +02:00
intel media: ipu3-cio2: Update Copyright year and fix indentation issues 2020-09-10 14:20:15 +02:00
ivtv media updates for v5.9-rc1 2020-08-07 13:00:53 -07:00
mantis media: mantis: convert tasklets to use new tasklet_setup() API 2020-08-29 08:11:19 +02:00
meye treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
netup_unidvb media: netup_unidvb: Don't leak SPI master in probe error path 2020-12-07 14:18:57 +00:00
ngene media: ngene: convert tasklets to use new tasklet_setup() API 2020-08-29 08:11:47 +02:00
pluto2
pt1 media: pci: Use dev_get_drvdata where possible 2019-07-25 06:45:10 -04:00
pt3 media: pci: Use dev_get_drvdata where possible 2019-07-25 06:45:10 -04:00
saa7134 media: saa7134: use generic power management 2020-09-26 10:55:34 +02:00
saa7146 media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:50 +01:00
saa7164 media: pci: saa7164-core.c: replace if (cond) BUG() with BUG_ON() 2020-08-29 07:50:03 +02:00
smipcie media: rc: harmonize infrared durations to microseconds 2020-09-03 16:18:55 +02:00
solo6x10 media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
sta2x11 media: media/pci: use vb2_video_unregister_device() 2020-08-28 15:01:54 +02:00
ttpci media: av7110: don't do float point math 2020-09-12 09:39:37 +02:00
tw68 media: tw68: use generic power management 2020-07-19 14:24:57 +02:00
tw686x media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:50 +01:00
tw5864 media: tw5864: check status of tw5864_frameinterval_get 2020-08-29 08:16:16 +02:00
Kconfig Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
Makefile