summaryrefslogtreecommitdiffstats
path: root/drivers/media/cec/cec-api.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-02-27 14:54:09 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-03-22 15:14:45 +0100
commit25c2107896c5094318f04af8f975266e57d15528 (patch)
treea01d995bf32868b71a0707bad5532ea42a055e3a /drivers/media/cec/cec-api.c
parent[media] cec: use __func__ in log messages (diff)
downloadlinux-25c2107896c5094318f04af8f975266e57d15528.tar.xz
linux-25c2107896c5094318f04af8f975266e57d15528.zip
[media] cec: improve cec_transmit_msg_fh logging
Several error paths didn't log why an error was returned. Add this. Also handle the corner case of "adapter is unconfigured AND the message is from Unregistered to TV AND reply is non-zero" separately and return EINVAL in that case, since it really is an invalid value and not an unconfigured CEC device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/cec/cec-api.c')
-rw-r--r--drivers/media/cec/cec-api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/cec/cec-api.c b/drivers/media/cec/cec-api.c
index cea350ea2a52..0860fb458757 100644
--- a/drivers/media/cec/cec-api.c
+++ b/drivers/media/cec/cec-api.c
@@ -202,7 +202,7 @@ static long cec_transmit(struct cec_adapter *adap, struct cec_fh *fh,
err = -EPERM;
else if (adap->is_configuring)
err = -ENONET;
- else if (!adap->is_configured && (msg.msg[0] != 0xf0 || msg.reply))
+ else if (!adap->is_configured && msg.msg[0] != 0xf0)
err = -ENONET;
else if (cec_is_busy(adap, fh))
err = -EBUSY;