[media] cec: fix ioctl return code when not registered

Don't return the confusing -EIO error code when the device is not registered,
instead return -ENODEV which is the proper thing to do in this situation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Hans Verkuil 2016-08-24 07:17:22 -03:00 committed by Mauro Carvalho Chehab
parent a179b69359
commit 60815d4a78

View file

@ -435,7 +435,7 @@ static long cec_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
void __user *parg = (void __user *)arg; void __user *parg = (void __user *)arg;
if (!devnode->registered) if (!devnode->registered)
return -EIO; return -ENODEV;
switch (cmd) { switch (cmd) {
case CEC_ADAP_G_CAPS: case CEC_ADAP_G_CAPS: