media: cec-adap.c: add 'unregistered' checks
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 8 Sep 2020 10:26:11 +0000 (12:26 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:25:13 +0000 (10:25 +0200)
commit2d307380efec79ef7e1bd91ad4886fc02e2df26a
tree4a584b8a7cd9a037236b7f027942aa14afbd95c7
parent5254187cfaf22facc42415ad45c16db53ffd0c87
media: cec-adap.c: add 'unregistered' checks

Make the code a bit more robust by checking if the adapter has
been unregistered at the start of cec_transmit_msg_fh() and
cec_received_msg_ts(). If it is unregistered, then just return.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/cec/core/cec-adap.c