linux/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
..
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
cec-pin-priv.h
cec-pin.c
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
Kconfig
Makefile