diff options
author | Hans Verkuil <hansverk@cisco.com> | 2016-08-24 10:17:22 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-09 13:38:33 (GMT) |
commit | 60815d4a78204915f5cdf79a536bc96d5d23ae5f (patch) | |
tree | 397fcf5b914cd9a75183d84752c1a89f5400b201 | |
parent | a179b69359feb26ddb148bb6a2c0c53a8d1dc5be (diff) | |
download | linux-60815d4a78204915f5cdf79a536bc96d5d23ae5f.tar.xz |
[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>
-rw-r--r-- | drivers/staging/media/cec/cec-api.c | 2 |
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 6f58ee8..e274e2f 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: |