linux/drivers/media
Hans Verkuil 498946cf6b media: cec-adap.c: don't unconfigure if already unconfigured
The __cec_s_log_addrs() function can configure or unconfigure the
adapter. The ioctl handler in cec-api.c will prevent it from being
called to configure the adapter if it was already configured (or in
the process of configuring). But it can still be called to unconfigure
an already unconfigured adapter, and it didn't check for that.

This can cause cec_activate_cnt_dec() to be called too often, causing
a WARN_ON.

Instead first check if adap->log_addrs.num_log_addrs == 0 and return
since in that case the adapter is already unconfigured.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-05-13 11:28:06 +02:00
..
cec media: cec-adap.c: don't unconfigure if already unconfigured 2022-05-13 11:28:06 +02:00
common media: videobuf2-dma-sg.c: kvmalloc_array -> kvcalloc 2022-05-13 11:02:22 +02:00
dvb-core media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
dvb-frontends media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c media: s5k6a3: add missing clk_disable_unprepare 2022-05-13 11:02:22 +02:00
mc media: mc: delete redundant code in __media_device_unregister_entity 2022-04-24 08:14:19 +01:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: cx25821: request_irq -> devm_request_irq 2022-05-13 11:02:22 +02:00
platform media: amphion: G/S_PARM only for encoder's output queue 2022-05-13 11:02:22 +02:00
radio media: make RADIO_ADAPTERS tristate 2022-05-13 11:02:19 +02:00
rc media: imon: reorganize serialization 2022-05-13 11:23:38 +02:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: vidtv: use vfree() for memory allocated with vzalloc() 2022-03-18 07:28:17 +01:00
tuners media: si2157: unknown chip version Si2147-A30 ROM 0x50 2022-04-09 17:45:49 +02:00
usb media: stkwebcam: move stk_camera_read_reg() scratch buffer to struct stk_camera 2022-05-13 11:02:20 +02:00
v4l2-core media: v4l2-ctls-core.c: kvmalloc_array -> kvcalloc 2022-05-13 11:02:22 +02:00
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00