diff options
author | Hans Verkuil | 2019-08-23 08:12:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2019-08-26 06:30:32 -0300 |
commit | 14d5511691e5290103bc480998bc322e68f139d4 (patch) | |
tree | 7e66458a41b2efb251bfb8aa40f93a7e7873c14e /drivers/vlynq | |
parent | 8f4b5b0af7e451a4c6698ad3441dde8d1286c80d (diff) |
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>
Diffstat (limited to 'drivers/vlynq')
0 files changed, 0 insertions, 0 deletions