mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-29 23:12:23 +00:00
[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>
This commit is contained in:
parent
25c2107896
commit
79cabaa320
@ -1461,12 +1461,16 @@ int __cec_s_log_addrs(struct cec_adapter *adap,
|
|||||||
* within the correct range.
|
* within the correct range.
|
||||||
*/
|
*/
|
||||||
if (log_addrs->vendor_id != CEC_VENDOR_ID_NONE &&
|
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;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (log_addrs->cec_version != CEC_OP_CEC_VERSION_1_4 &&
|
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;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (log_addrs->num_log_addrs > 1)
|
if (log_addrs->num_log_addrs > 1)
|
||||||
for (i = 0; i < log_addrs->num_log_addrs; i++)
|
for (i = 0; i < log_addrs->num_log_addrs; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user