]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] cec: fix ioctl return code when not registered
authorHans Verkuil <hansverk@cisco.com>
Wed, 24 Aug 2016 10:17:22 +0000 (07:17 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 9 Sep 2016 13:38:33 +0000 (10:38 -0300)
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>
drivers/staging/media/cec/cec-api.c

index 6f58ee85eea4590f7a87a998e1ed97bc8e92b7f9..e274e2f223986bc4ed075447c9a17186b5de0dae 100644 (file)
@@ -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: