diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2017-02-20 17:19:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-03-22 11:15:23 -0300 |
commit | 79cabaa320d7ba07a233afb944dd151d26b7ddbd (patch) | |
tree | 23330dba34f7ab95614414ead0a21f67966902ab | |
parent | 25c2107896c5094318f04af8f975266e57d15528 (diff) | |
download | linux-79cabaa320d7ba07a233afb944dd151d26b7ddbd.tar.bz2 |
[media] cec: log reason for returning -EINVAL
When validating the struct cec_s_log_addrs input a debug message is printed
for all except two of the 'return -EINVAL' paths.
Also log the reason for the missing two paths.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/cec/cec-adap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index 9e25ba20f4d1..46b7da6df9b5 100644 --- a/drivers/media/cec/cec-adap.c +++ b/drivers/media/cec/cec-adap.c @@ -1461,12 +1461,16 @@ int __cec_s_log_addrs(struct cec_adapter *adap, * within the correct range. */ if (log_addrs->vendor_id != CEC_VENDOR_ID_NONE && - (log_addrs->vendor_id & 0xff000000) != 0) + (log_addrs->vendor_id & 0xff000000) != 0) { + dprintk(1, "invalid vendor ID\n"); return -EINVAL; + } if (log_addrs->cec_version != CEC_OP_CEC_VERSION_1_4 && - log_addrs->cec_version != CEC_OP_CEC_VERSION_2_0) + log_addrs->cec_version != CEC_OP_CEC_VERSION_2_0) { + dprintk(1, "invalid CEC version\n"); return -EINVAL; + } if (log_addrs->num_log_addrs > 1) for (i = 0; i < log_addrs->num_log_addrs; i++) |