WSL2-Linux-Kernel/drivers/media/cec
Hans Verkuil 14d5511691 media: cec-notifier: clear cec_adap in cec_notifier_unregister
If cec_notifier_cec_adap_unregister() is called before
cec_unregister_adapter() then everything is OK (and this is the
case today). But if it is the other way around, then
cec_notifier_unregister() is called first, and that doesn't
set n->cec_adap to NULL.

So if e.g. cec_notifier_set_phys_addr() is called after
cec_notifier_unregister() but before cec_unregister_adapter()
then n->cec_adap points to an unregistered and likely deleted
cec adapter. So just set n->cec_adap->notifier and n->cec_adap
to NULL for rubustness.

Eventually cec_notifier_unregister will disappear and this will
be simplified substantially.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-26 06:30:32 -03:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile media: cec: remove cec-edid.c 2018-09-24 09:11:06 -04:00
cec-adap.c media: cec-adap: return from cec_s_conn_info() if adap is invalid 2019-08-26 06:30:14 -03:00
cec-api.c media: cec: move check from cec_transmit to cec_transmit_msg_fh 2019-05-23 05:31:35 -04:00
cec-core.c media: cec: add struct cec_connector_info support 2019-06-27 07:18:43 -04:00
cec-notifier.c media: cec-notifier: clear cec_adap in cec_notifier_unregister 2019-08-26 06:30:32 -03:00
cec-pin-error-inj.c media: cec-pin-error-inj: avoid a false-positive Spectre detection 2018-05-28 16:11:17 -04:00
cec-pin-priv.h media: cec: improve CEC pin event handling 2018-03-22 08:16:52 -04:00
cec-pin.c media: cec-pin: fix broken tx_ignore_nack_until_eom error injection 2018-11-23 05:48:44 -05:00
cec-priv.h media: cec: add CEC_MSG_FL_RAW flag and msg_is_raw helper function 2019-05-23 05:32:40 -04:00