media: cec: improve debugging
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 8 Feb 2018 16:55:48 +0000 (11:55 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 26 Feb 2018 13:12:49 +0000 (08:12 -0500)
commit1b3963509a469c70b965c2211db4eb3427c4ef86
tree838e498d3e1fdf9f3060ddee827634a6170c2196
parent47b934875b00fefe16a2b8a9daa88eb82be169a8
media: cec: improve debugging

cec_transmit_msg_fh() first checked the message for errors, and only
after the message was found to be valid did it log the message contents.

However, that makes it hard to associate an error in the kernel log with
the message since the message contents was never logged in that case.

So swap the order: first log the message (once some very basic checks
are done), and only after that check for errors.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/cec/cec-adap.c