aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2016-08-24 07:17:22 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-09 10:38:33 -0300
commit60815d4a78204915f5cdf79a536bc96d5d23ae5f (patch)
tree397fcf5b914cd9a75183d84752c1a89f5400b201 /drivers/staging
parent[media] cec: don't Feature Abort broadcast msgs when unregistered (diff)
downloadlinux-dev-60815d4a78204915f5cdf79a536bc96d5d23ae5f.tar.xz
linux-dev-60815d4a78204915f5cdf79a536bc96d5d23ae5f.zip
[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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/cec/cec-api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/cec/cec-api.c b/drivers/staging/media/cec/cec-api.c
index 6f58ee85eea4..e274e2f22398 100644
--- a/drivers/staging/media/cec/cec-api.c
+++ b/drivers/staging/media/cec/cec-api.c
@@ -435,7 +435,7 @@ static long cec_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
void __user *parg = (void __user *)arg;
if (!devnode->registered)
- return -EIO;
+ return -ENODEV;
switch (cmd) {
case CEC_ADAP_G_CAPS: